From f6dfacf9d67d25efad539c3c242a63815ae4f6c7 Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Wed, 20 May 2020 07:45:14 -0700 Subject: [PATCH] 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. --- src/Text/Pandoc/Readers/HTML.hs | 2 +- test/command/6385.md | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 test/command/6385.md diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index f85b24d3f..3f6e0a1af 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -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"] diff --git a/test/command/6385.md b/test/command/6385.md new file mode 100644 index 000000000..f67b82988 --- /dev/null +++ b/test/command/6385.md @@ -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> +```