WriteDescriptiveListItem() missing closing tags for dt and dd

This commit is contained in:
leen 2019-08-26 18:38:04 +08:00
parent f67a251e27
commit 9aec7ca151
2 changed files with 26 additions and 17 deletions

View file

@ -335,9 +335,10 @@ func (w *HTMLWriter) WriteDescriptiveListItem(di DescriptiveListItem) {
} else { } else {
w.WriteString("?") w.WriteString("?")
} }
w.WriteString("</dt>\n")
w.WriteString("<dd>\n") w.WriteString("<dd>\n")
WriteNodes(w, di.Details...) WriteNodes(w, di.Details...)
w.WriteString("<dd>\n") w.WriteString("</dd>\n")
} }
func (w *HTMLWriter) WriteParagraph(p Paragraph) { func (w *HTMLWriter) WriteParagraph(p Paragraph) {

View file

@ -109,26 +109,30 @@ descriptive lists
</p> </p>
<dl> <dl>
<dt class="unchecked"> <dt class="unchecked">
term<dd> term</dt>
<dd>
<p> <p>
details details
continued details continued details
</p> </p>
<dd> </dd>
<dt class="unchecked"> <dt class="unchecked">
?<dd> ?</dt>
<dd>
<p> <p>
details without a term details without a term
</p> </p>
<dd> </dd>
<dt class="checked"> <dt class="checked">
term<dd> term</dt>
<dd>
<p> <p>
details on a new line details on a new line
</p> </p>
<dd> </dd>
<dt> <dt>
term<dd> term</dt>
<dd>
<p> <p>
details on a new line (with an empty line in between) details on a new line (with an empty line in between)
<strong>continued</strong> <strong>continued</strong>
@ -140,7 +144,7 @@ echo &#34;Hello World!&#34;
</pre> </pre>
</div> </div>
</div> </div>
<dd> </dd>
</dl> </dl>
<p> <p>
some list termination tests some list termination tests
@ -207,31 +211,35 @@ ordered 2
</ol> </ol>
<dl> <dl>
<dt> <dt>
unordered descriptive<dd> unordered descriptive</dt>
<dd>
<p> <p>
1 1
</p> </p>
<dd> </dd>
<dt> <dt>
unordered descriptive<dd> unordered descriptive</dt>
<dd>
<p> <p>
2 2
</p> </p>
<dd> </dd>
</dl> </dl>
<dl> <dl>
<dt> <dt>
ordered descriptive<dd> ordered descriptive</dt>
<dd>
<p> <p>
1 1
</p> </p>
<dd> </dd>
<dt> <dt>
ordered descriptive<dd> ordered descriptive</dt>
<dd>
<p> <p>
2 2
</p> </p>
<dd> </dd>
</dl> </dl>
<ul> <ul>
<li> <li>