Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Wiki Code Blocks

edited September 2014 in Apps

The Wiki code blocks display as one long word-wrapped line under IE8 (I know!). That is:

    printf("Hello World");

actually displays as:

#include<stdio.h>    main()    {
    printf("Hello World");    }

It seems to boil down to the fact that the jquery.syntax blockSelector is attached to <pre><code>.

If it's changed to simply <pre> then it works fine on IE8, Firefox 31, Chromium 35 and Android's Chrome browsers. I've not tried with anything else.

I thought I'd bring it up here for discussion before submitting a patch.

Can anyone see any problems with changing it to <pre>? Of course, I could just change it on my installation as I'm probably the only one left using IE8!



  • I've been meaning to replace the markdown parser with Parsedown, but the output will renders blocks as <pre><code>. Does changing the blockSelector to pre fix the issue in all browsers?

    If not, maybe there's an update to jquery.syntax that fixes it, or some CSS we can use to fix it?

  • I think all markdowns and variants use <pre><code> for code. The problem is also using it as the blockSelector for the syntax highlighting.

    Using <pre> as the blockSelector works on the few non-IE browsers I've tested. Also, the jquery.syntax examples use <pre class="syntax"> as the selector, suggesting it's the way it should be done?

    I've not come across this issue on other sites that syntax highlight (such as Stack Exchange etc).

  • Sorry I've been a bit slow to fix such a simple thing. Just pushed the fix for this as per your suggestion :)

Sign In or Register to comment.