Feature Request - Raw HTML in ddoc comments

BCS ao at pathlink.com
Mon Mar 3 11:35:41 PST 2008


Reply to Derek,

> On Mon, 03 Mar 2008 09:30:18 +0100, Roberto Mariottini wrote:
> 
>> Ddoc must provide a way to define escaping of characters for every
>> particular output format. I don't know how, but some way must be
>> found.
>> 
>> Otherwise programmers will stop to write documentation.
>> 
> I was thinking something along the lines of whenever dmd, while
> generating DDoc code, sees *any* punctuation character it
> automatically converts it into a DDoc macro for that character. Then
> then macro expansion can take care of the 'escape' situation.
> 
> So, if dmd sees ...
> 
> this function turns & into &
> 
> it generates ...
> 
> this function turns $(D_AMP)amp$(D_SC) into $(D_AMP)
> 
> then uses the 'current' macro set to do the expansion.
> 
> So if the current macro set is for HTML we have ...
> 
> D_AMP=&
> D_SC=;
> so the end result is ...
> 
> this function turns & into &
> 
> OK, so this means that there are a lot more macros to define, but it
> should make it a lot more portable. I'm not sure if it covers all
> cases but I think it will cover most.
> 

Hmmm. Food for though. What about multi char sequences?





More information about the Digitalmars-d mailing list