test case that shows macros are currently not expanded.
text/plain
293
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