1435 – DDoc: Don't apply DDOC_PSYMBOL everywhere

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1435 - DDoc: Don't apply DDOC_PSYMBOL everywhere
Summary: DDoc: Don't apply DDOC_PSYMBOL everywhere
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: Walter Bright
URL:
Keywords:
: 1617 (view as issue list)
Depends on:
Blocks:
Reported: 2007年08月20日 13:10 UTC by Carlos Santander
Modified: 2015年06月09日 01:31 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Carlos Santander 2007年08月20日 13:10:46 UTC
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 Walter Bright 2007年08月30日 13:51:48 UTC
It is designed to work that way (prepending the _ as an escape), despite being ugly.
Comment 2 Carlos Santander 2007年08月30日 16:51:35 UTC
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 Walter Bright 2007年08月31日 00:29:51 UTC
Ok, that's a very good reason to reopen it.
Comment 4 Carlos Santander 2007年10月27日 14:42:52 UTC
*** Bug 1617 has been marked as a duplicate of this bug. ***
Comment 5 Walter Bright 2008年02月28日 22:43:46 UTC
Fixed dmd 1.027 and 2.011


AltStyle によって変換されたページ (->オリジナル) /