Feature Request - Raw HTML in ddoc comments

Janice Caron caron800 at googlemail.com
Fri Feb 22 00:08:26 PST 2008


On 22/02/2008, Janice Caron <caron800 at googlemail.com> wrote:
> Hi, I'd love to put raw HTML inside ddoc comments, instead of having
>  to learn all the ddoc macros, which (...no offense...) aren't quite up
>  to the job, and are very hard to "debug" when they go wrong.

Bill Baxter replied
> I believe that has been asked for before and the answer from
> Walter was no, because he wants DDOC to be able to generate
> LaTeX or pdf or man pages or whatever format you desire just by
> changing the macros.

A good argument. However, there's no reason why LaTeX or pdf or man
pages couldn't be auto-generated from a subset of XHTML. It wouldn't
be that hard to write a parser for XHTML which enforced that only a
limited subset of XHTML was allowed. In fact, I suspect that, now that
we have std.xml, it would actually be /easier/ to parse XHTML than
to parse ddoc code. Either way, you can turn it easily into an
internal represention, and then back out into any form you wanted
(although for HTML itself, it would suffice to just check the syntax,
then paste it in verbatim if it passed).



More information about the Digitalmars-d mailing list