[Haskell-cafe] Pretty printing HTML
ndmitchell at gmail.com
Tue Dec 12 09:14:38 EST 2006
I want to pretty print some text as HTML, using the standard HughesPJ
combinators. The problem is that I want the "length" of a text string
to be its textual context, not its character length.
For example, a keyword will display as "case", but internally will be
the string "<span class='keyword'>case</span>"
Is there any way to acheive this? I have come up with something, but
its not nice at all. It basically involves parsing the generated text
and inserting the extra HTML back in.
More information about the Haskell-Cafe