Bug 17169 – New default ddoc theme merges all paragraphs except the first
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2017-02-10T00:43:00Z
Last change time
2017-02-24T20:34:40Z
Assigned to
nobody
Creator
bus_dbugzilla
Comments
Comment #0 by bus_dbugzilla — 2017-02-10T00:43:23Z
doccomment.d:
-----------------
/++
P1
P2
P3
+/
void foo(){}
-----------------
Compile:
$ dmd -Xf=doccomment.json -Dfdoccomment.html -c doccomment.d
The resulting JSON is ok, same as it's always been, but with the new default theme, the HTML fails to make P2 and P3 into separate paragraphs:
-----------------
<div class="ddoc_description">
<h4>Discussion</h4>
<p class="para">
P2
P3
</p>
</div>
-----------------
Comment #3 by bus_dbugzilla — 2017-02-14T03:58:35Z
P1 is in a separate "Summary" div further up from the Description div shown here. This, I understand, is intentional as the first paragraph is considered to be the "summary", and the rest, "discussion" <http://dlang.org/spec/ddoc.html#sections>.
Taking a look at the PR, and the test file changes in it, it appears it would add <br><br> between P2 and P3 (just like the old theme did), although I havent actually run the PR myself. There was some discussion in DMD PR#4745 <https://github.com/dlang/dmd/pull/4745#issuecomment-278841601> that this isn't intended to be the ideal long-term aaproach, however it seemed generally agreed that the "proper" aaproach would be tricky and involved, and that this <br><br> was a better than nothing in the meantime.
Comment #4 by github-bugzilla — 2017-02-16T12:37:57Z