With discourse you can sometimes drop in raw HTML in line, e.g.
test(X) :-
line 1
line 2
<code>
test(X) :-<br>
<b>line 1</b><br>
line 2
</code>
Granted you have know HTML and add lots of extra tags such as <br>
and  
but it does work.
Here is an example that pushes it to the limit.