Within a <PRE> block, &para turns into a new paragraph symbol:

I use <PRE> blocks for code when I want to bold, so a function that's written

void go( ObjectA &parameter1, ObjectB &parameter2 ) { }

Comes out as:

void go( ObjectA ¶meter1, ObjectB ¶meter2 ) { }

What's the dilly-yo

  • 1
    What's the use case for bold in code blocks? I've never wanted that. And everything works just fine if you use markdown...
    – Cody Gray
    Aug 4 '11 at 13:42
  • 1
    @Cody Bold in code blocks is useful to highlight specific things, and there were several feature requests to have it meta.stackexchange.com/questions/32705/bold-code-in-a-question meta.stackexchange.com/questions/54392/… meta.stackexchange.com/questions/97383/… Aug 4 '11 at 14:16
  • 4
    @Daniel: Oh goodness, let's not do that. We'll get a whole bunch of questions from the gruff C and C++ communities complaining that using pointers now make their entire code blocks render in bold. I don't understand what's wrong with using comments to highlight specific things. You shouldn't be posting so much code that we need bold to see what to focus on in the first place.
    – Cody Gray
    Aug 4 '11 at 14:21
  • 1
    <PRE> block is meant to display HTML and that's exactly what it's doing.. so it's not a bug. You might change it to feature request, asking to encode HTML entities inside <pre> sections. Aug 4 '11 at 14:43

This is expected, since the browser thinks that it knows better than you do.

No conversion is done inside of raw HTML blocks by the Markdown parser, which means that your & isn't encoded to &amp; before being inserted into the HTML. Even though both the client and server-side parser return the literal &para in the source, the browser decides that you meant &para;, and renders ¶ instead.

If you're going to use raw HTML, you need to make sure you properly escape your entities manually:



  • 6
    actually, not "the browser thinks that it knows better than you do", but "markdown thinks you know better than it" :)
    – balpha
    Aug 4 '11 at 16:03
  • True, although the browser is also being liberal in deciding what's an entity (since there's no ; there). Technically if it's using SGML rules, the first case could be considered valid, but the &parameter is just wrong.
    – Tim Stone
    Aug 4 '11 at 16:07
  • No, the "browser does know better than you do". If it didn't, bobobobobobo would have written &amp; in the first place!
    – SamB
    Feb 7 '12 at 1:05
  • Worked like charm! :) Was breaking my head with &para symbol for so long.
    – Nariman
    Apr 7 '14 at 10:12

Or use &Parameter1 (captial P) to avoid this unwanted replacement

  • Many programming languages are case-sensitive, and a fair few have opinions about proper parameter casing. Mar 13 '17 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .