Bug 17697 – Ddoc: automatically highlight URLs outside of macro arguments

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-26T22:42:16Z
Last change time
2020-03-21T03:56:38Z
Keywords
ddoc
Assigned to
No Owner
Creator
Walter Bright

Comments

Comment #0 by bugzilla — 2017-07-26T22:42:16Z
For example, /* http://website.com/_abc */ module abc; The _ is needed to prevent Ddoc from highlighting the abc. But this makes the URL unusable from a text editor. The solution is to get rid of _ detection inside of URLs.
Comment #1 by destructionator — 2017-07-26T23:12:28Z
The correct solution is to get rid of the utterly counterproductive identifier highlighting entirely, then remove the useless _ suppression entirely.
Comment #2 by dlang-bugzilla — 2017-07-27T17:23:34Z
(In reply to Adam D. Ruppe from comment #1) > The correct solution is to get rid of the utterly counterproductive > identifier highlighting entirely, then remove the useless _ suppression > entirely. We only need to restrict it to $(D ...) or `backtick` blocks, as any identifiers that would benefit from being highlighted would need to be there anyway.
Comment #3 by bugzilla — 2017-07-28T08:19:24Z
An even better solution is for Ddoc to recognize URLs and wrap them automatically in $(LINK ) macros. This will also resolve the leading _ problem in URLs.
Comment #4 by destructionator — 2017-07-28T16:22:55Z
The highlight thing and _ treatment happens in macros too...
Comment #5 by bugzilla — 2017-07-29T06:39:19Z
Comment #6 by bugzilla — 2017-07-30T20:20:11Z
*** Issue 17704 has been marked as a duplicate of this issue. ***
Comment #7 by github-bugzilla — 2017-07-31T03:41:10Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f100182bbde9496063c223fab2880a901be29880 fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro arguments https://github.com/dlang/dmd/commit/d15072fc64c1d59ac107834a3c2738919a243002 Merge pull request #7043 from WalterBright/fix17697 fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro… merged-on-behalf-of: Walter Bright <[email protected]>
Comment #8 by github-bugzilla — 2017-08-07T13:17:43Z
Commits pushed to newCTFE at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f100182bbde9496063c223fab2880a901be29880 fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro arguments https://github.com/dlang/dmd/commit/d15072fc64c1d59ac107834a3c2738919a243002 Merge pull request #7043 from WalterBright/fix17697
Comment #9 by github-bugzilla — 2017-08-16T13:24:05Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/f100182bbde9496063c223fab2880a901be29880 fix Issue 17697 - Ddoc: automatically highlight URLs outside of macro arguments https://github.com/dlang/dmd/commit/d15072fc64c1d59ac107834a3c2738919a243002 Merge pull request #7043 from WalterBright/fix17697