Feature Request - Raw HTML in ddoc comments

Adam D. Ruppe destructionator at gmail.com
Sat Mar 1 11:06:03 PST 2008


On Sat, Mar 01, 2008 at 06:51:22PM +0000, Janice Caron wrote:
> DMD should /not/ pass HTML
> through unchanged. It should sanitize the input, in order specifically
> to prevent it from being interpreted as markup in the output format.

Maybe it should have some kind of conversion macros for individual characters.
These would applied after the normal parsing of the file; to the step right
before the output file is actually generated.

For HTML, you would define a macro file that says
'&' => '&'
'<' => '&lt;'

And so on. For LaTeX, you might say
'&' => '\&'

Etc.

This would be somewhat tedious to write, but common output formats could have
the appropriate files written once and reused, and it is flexible enough so
you could easily expand it to other output formats with different rules.

-- 
Adam D. Ruppe
http://arsdnet.net



More information about the Digitalmars-d mailing list