Bug 18703 – Ddoc Backticks inside macro dont work.

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-02T04:27:50Z
Last change time
2024-12-13T18:58:04Z
Keywords
ddoc
Assigned to
No Owner
Creator
ArturG
Moved to GitHub: dmd#17853 →

Comments

Comment #0 by var.spool.mail700 — 2018-04-02T04:27:50Z
$(TEST) MACROS: TEST = `this should be highlighted as code` generates: `this should be highlighted as code` but should generate: <code class="code">this should be highlighted as code</code>
Comment #1 by greensunny12 — 2018-04-02T05:33:42Z
Yeah this should really work.. If you depend on this - `$(D_INLINECODE` might be a workaround: https://run.dlang.io/is/A24qYc or: Macros: D = <code>$1</code>
Comment #2 by var.spool.mail700 — 2018-04-04T06:23:14Z
this might be the same/similar issue: $(DDOC_EXAMPLES --- void fun(int){} // highlighted $(FUN) // expanded but not highlighted --- ) MACROS: FUN = void fun(int){}
Comment #3 by destructionator — 2023-05-20T12:57:38Z
The original intention was to keep defined macros not doing magic so you can use them to escape. In fact, if you look at the original PR, the escape $(BACKTICK) macro is defined just as =` which works because of this rule. https://github.com/dlang/dmd/pull/4228 However, since that is an individual `, the thing wouldn't generally be applied anyway so maybe this can change.
Comment #4 by robert.schadek — 2024-12-13T18:58:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17853 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB