ActiveState Community

Posting code on the forums

Posted by florentv on 2009-04-11 11:25
OS: All / Any

Hello,

The forums can use the GeSHi syntax highlighter for code blocks, but this is not documented here or in the FAQs if i'm not mistaken.

Here is what i found which works:

<code type="some_language">
Your code here
</code>

Python and CSS work, but HTML doesn't (or i didn't find the right keyword). It would be nice to have a list of supported/activated filters. ;)
My guess is that this implementation is actually Drupal's GeSHi Filter module:
http://drupal.org/project/geshifilter

For HTML, and some other pieces of code, you still have to replace instances of < and > (and possibly &) with &lt;, &gt; and &amp;.

stan | Sat, 2009-04-11 12:32

Have a look at this. You are right, it does use Geshi.

  1.     <head></head>
  2.     <body></body>
  3. </html>
<html>
    <head></head>
    <body></body>
</html>

florentv | Sat, 2009-04-11 15:41

My bad, i missed that page. And the link to it is quite obvious, too. Geez.