November 22 [Issue 24871] New: DDoc strips indent in triple slash comments | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24871 Issue ID: 24871 Summary: DDoc strips indent in triple slash comments Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: trivial Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: artha@samerion.com Consider this example file with line comment documentation that contains a code snippet: ```d import std.stdio; /// Example /// --- /// void main() { /// foreach (i; 0..10) { /// writeln("Hello, world!"); /// } /// } /// --- void main() { writeln("Hello, World!"); } ``` When rendered using `dmd -D`, the indent in the snippet is gone: ```d <pre><code class="code"><span class="keyword">void</span> <span class="psymbol">main</span>() { <span class="keyword">foreach</span> (i; 0..10) { writeln(<span class="string_literal">"Hello, world!"</span>); } } </code></pre> This is not the case if block comments are used. ``` -- |
Copyright © 1999-2021 by the D Language Foundation