DDOC adds emphasis on symbols, so how to use $(LINK a) properly?

kraybit via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 2 07:45:52 PST 2015


Just wanna follow up.


Thanks for the replies everyone. Helped a lot!


***


Hmm, this might be out of line, but I can't help myself. I got an 
idea. I guess a nice feature would be something like a built-in 
clean representation of macro arguments, so that you could define 
LINK as


     LINK = <a href="$_0">$0</a>


Or perhaps an immutable built-in macro?


     LINK = <a href="$(CLEAN $0)">$0</a>


And then it would always work? I mean it seems most macros 
generate HTML, and then anything is fine really. But there are 
those special cases when you're generating something other than 
HTML, such as an URL, or even JavaScript-code, and you really 
need to get rid of all "cleverness".

I've understood you always end posts like this with:
Destroy!

So there, I did it :)
Cheers!


More information about the Digitalmars-d-learn mailing list