Improve anchors for ddoc (

Adam D. Ruppe destructionator at
Sat Feb 18 15:46:42 PST 2012

On Saturday, 18 February 2012 at 23:27:43 UTC, Adam D. Ruppe 
> But, the anchor should be a relatively easy fix.

Yeah, a very easy fix.

Previously, it changed the name of the thing to become:

"$(DDOC_PSYMBOL %s)", toChars()

and this macro looked like


say we have a struct Test in the module cool.

we'd get <u>Test</u>

If we make it

"$(DDOC_PSYMBOL %s, %s)", toChars(), toPrettyChars()

in the compiler, we can change the macro to:


to keep the current look. But, we also have $0...

$(DDOC_PSYMBOL Test, cool.Test)

$1 = Test
$2 = the full name, cool.Test

We now have more stuff to use. All existing macros
will have to change from $0 to $1 to keep the current

I wonder how many people's docs this will break? It is an
easy, easy fix though, and I'll fix the default macros too.

More information about the Digitalmars-d mailing list