Add "summary" to list of block-level HTML tags.

Closes #6385.  (The summary element needs to be the first
child of details and should not be enclosed by p tags.)

NOTE:  you need to include a blank line before the closing
`</details>`, if you want the last part of the content to
be parsed as a paragraph.
This commit is contained in:
John MacFarlane 2020-05-20 07:45:14 -07:00
parent 311d4c9dfc
commit f6dfacf9d6
2 changed files with 19 additions and 1 deletions

View file

@ -1067,7 +1067,7 @@ blockHtmlTags = Set.fromList
"h5", "h6", "head", "header", "hgroup", "hr", "html",
"isindex", "main", "menu", "meta", "noframes", "nav",
"ol", "output", "p", "pre",
"section", "table", "tbody", "textarea",
"section", "summary", "table", "tbody", "textarea",
"thead", "tfoot", "ul", "dd",
"dt", "frameset", "li", "tbody", "td", "tfoot",
"th", "thead", "tr", "script", "style"]

18
test/command/6385.md Normal file
View file

@ -0,0 +1,18 @@
```
% pandoc -f markdown -t html
<details>
<summary>Show me:</summary>
details para 1
details para 2
</details>
^D
<details>
<summary>
Show me:
</summary>
<p>details para 1</p>
<p>details para 2</p>
</details>
```