5
\$\begingroup\$

Exhibit A:

enter image description here

The symbol d_n+1 is highlighted as the variable d_n, operator+, and 1. This is incorrect; the symbol should be all one color.

\$\endgroup\$
  • 3
    \$\begingroup\$ This will probably have a higher chance of getting fixed if you report this on the prettify issue tracker. \$\endgroup\$ – sepp2k Mar 23 '11 at 15:40
5
\$\begingroup\$

First, make sure the correct language highlighter is being used.

If the question is tagged that should be correct, but verify that the code class is correct in Google Chrome inspector.

For example on Cube root (Newton's method) which is tagged and I see the divs correctly have lang-lisp on them:

enter image description here

If this is not the case, try to fix the tags first and remember diamond mods can change the prettify language per-tag on the tag page.

If it's not fixable through tags (say the question is tagged or something) then you can manually specify the language, like so

<!-- language: lang-or-tag-here -->

    code goes here

It's very important you have the linebreak there.

If you've done this and the highlighting is still weird, indeed it must be filed as a bug against Google Code Prettify.

\$\endgroup\$
  • 3
    \$\begingroup\$ The question in question is definitely highlighted as lisp (it says <pre class="lang-lisp prettyprint"> in the HTML source and everything else in the code sample (e.g. the defun keyword which is pretty lisp specific) is highlighted correctly). So this is indeed a bug in prettify's lisp highlighting. \$\endgroup\$ – sepp2k Mar 23 '11 at 23:33

You must log in to answer this question.

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