ddoc: Can I escape a colon?

Nick Sabalausky (Abscissa) via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Feb 23 19:11:25 PST 2017


On 02/23/2017 04:34 PM, Ali Çehreli wrote:
>
> (None of the following is tested.)
>
> a) Try using the following macro:
>
>      COLON = :
>
> And then use "Note$(COLON) Blah".
>

Thanks, that works.

> c) Another option:
>
>      NOTE = Note: $0
>
> Then use "$(NOTE Blah)"

Actually, that's more or less what I was already doing anyway (for a 
changelog):

ENHANCE  = $(LI $(B Enhancement:) $0)
CHANGE   = $(LI $(B Change:) $0)
FIXED    = $(LI $(B Fixed:) $0)

But the section interpretation there wasn't playing nice with newer 
versions of ddox. Using that "COLON = :" trick fixed it though (and 
does indeed appear to work outside of these macros, too.




More information about the Digitalmars-d-learn mailing list