Currently, DDoc applies the DDOC_PSYMBOL macro everywhere. This can result in wrong HTML links:
/// $(LINK2 http://www.example.com/foo,sample)
void foo() {}
This will generate this tag (from memory):
<a href="http://www.example.com/<u>foo</u>">sample</a>
Which is obviously wrong. The workaround is to prepend an underscore to foo, like this:
/// $(LINK2 http://www.example.com/_foo,sample)
void foo() {}
But this feels like an ugly hack. One solution would be to make LINK and LINK2 special and don't apply DDOC_PSYMBOL to them. I feel that it would better to define a special macro (NO_FORMAT, or something like that) that prevents this from happening, and that can usable in other contexts. LINK and LINK2 (and maybe other macros) would be defined in terms of this new macro.
Comment #1 by bugzilla — 2007-08-30T13:51:48Z
It is designed to work that way (prepending the _ as an escape), despite being ugly.
Comment #2 by casantander1 — 2007-08-30T16:51:35Z
That makes the URLs usable only when the documentation is generated. In the source code, it's unusable. If an IDE supports opening URLs on the source code (I think Eclipse does that with Java code), all opened URLs will be wrong.
Comment #3 by bugzilla — 2007-08-31T00:29:51Z
Ok, that's a very good reason to reopen it.
Comment #4 by casantander1 — 2007-10-27T14:42:52Z
*** Bug 1617 has been marked as a duplicate of this bug. ***