[ocamlweb-devel] syntax highlighting

Maxence Guesdon maxence.guesdon at inria.fr
Wed Dec 19 15:10:17 GMT 2012


I'm having a look at syntax highlighting, since it's missing on code
from pages in tutorials/.

Looking at the source of main page, I see that highlighting requires
adding attributes to <pre> nodes:
  <pre class="listing" ml:content="ocaml noeval">

I find it quite heavy to type all this each time a piece of ocaml code
is to be included. Is there a lighter way ?

Another question: Is there a way to include an ocaml file ?

And more generally: Is there a way to define some kind of rewrite rules
on nodes ? For example to we able to define that
should be rewritten
  <pre class="listing" ml:content="ocaml noeval">...</pre>
(this could be useful tool in the 99problems page, so avoid having to
type all these "buttons" code for each problem.

This would be done very easily in stog :-)



More information about the Infrastructure mailing list