Bug 13211 – Expand macros in comments within code sections

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-27T08:38:20Z
Last change time
2024-12-13T18:23:00Z
Keywords
ddoc
Assigned to
No Owner
Creator
Alix Pexton
See also
https://issues.dlang.org/show_bug.cgi?id=12383
Moved to GitHub: dmd#17672 →

Attachments

IDFilenameSummaryContent-TypeSize
1371test.ddtest case that shows macros are currently not expanded.text/plain293

Comments

Comment #0 by alix.pexton — 2014-07-27T08:38:20Z
Created attachment 1371 test case that shows macros are currently not expanded. Currently, macros that occur within comment in a code section are not expanded. See attached minimal test case.
Comment #1 by alix.pexton — 2014-07-27T14:19:17Z
I think this is related to the case where macros inside string literals in code sections are not expanded (bug:12383). Code in a code section that compiles when copy/pasted as-is can have macros that are not expanded when documentation is generated. Code in a code section that contains macros that are expanded when documentation is generated won't compile if just copy/pasted as-is. I'm starting to think that macros in code sections should be discouraged.
Comment #2 by hsteoh — 2014-09-11T17:02:40Z
I agree, we should stop using macros in code sections. If something needs to be highlighted, it should be done via comments.
Comment #3 by dlang-bugzilla — 2017-07-19T05:23:43Z
Whether or not macros should be expanded in code blocks at all, the current behaviour is at least inconsistent, so there is certainly a bug here.
Comment #4 by robert.schadek — 2024-12-13T18:23:00Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17672 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB