From 345b33762eb4cc6d57d74c76c4757a6166ee5c13 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 5 Sep 2019 22:22:07 -0700 Subject: Shared.hierarchicalize: improve handling of div and section structure. Previously Divs were opaque to hierarchicalize, so headings inside divs didn't get into the table of contents, for example (#3057). Now hierarchicalize treats Divs as sections when appropriate. For example, these structures both yield a section and a subsection: ``` html

one

two

``` ``` html

one

two

``` Note that ``` html

one

two

three

``` gets parsed as the structure one two three which may not always be desirable. Closes #3057. --- test/command/3057.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 test/command/3057.md (limited to 'test/command') diff --git a/test/command/3057.md b/test/command/3057.md new file mode 100644 index 000000000..b1f3a8c2e --- /dev/null +++ b/test/command/3057.md @@ -0,0 +1,54 @@ +``` +% pandoc -f markdown -t docbook +
+# one +
+## two +
+
+^D +
+ one +
+ two + + +
+
+``` + +``` +% pandoc -f markdown -t docbook +
+# one +
+# two +
+
+^D +
+ one +
+ two + + +
+
+``` + +``` +% pandoc -f markdown -t docbook +# one +
+# two +
+^D +
+ one +
+ two + + +
+
+``` -- cgit v1.2.3