summaryrefslogtreecommitdiff
path: root/test/command/3596.md
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-04-23 10:55:16 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-04-23 11:03:48 +0200
commit51a46b7e31c92c717ca4778df96535b0e492babe (patch)
treee6aa72b6e4fb02d1a8c708123e31138cac48e175 /test/command/3596.md
parentc5f4a0b9c52188f94b8798c43df8f4f5c61278e4 (diff)
HTML reader: Revise treatment of li with id attribute.
Previously we always added an empty div before the list item, but this created problems with spacing in tight lists. Now we do this: If the list item contents begin with a Plain block, we modify the Plain block by adding a Span around its contents. Otherwise, we add a Div around the contents of the list item (instead of adding an empty Div to the beginning, as before). Closes #3596.
Diffstat (limited to 'test/command/3596.md')
-rw-r--r--test/command/3596.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/test/command/3596.md b/test/command/3596.md
new file mode 100644
index 000000000..a064ca632
--- /dev/null
+++ b/test/command/3596.md
@@ -0,0 +1,61 @@
+```
+% pandoc -f html -t markdown-raw_html-bracketed_spans-native_spans
+<ul>
+<li>foo</li>
+<li id="id">bar</li>
+<li>baz</li>
+</ul>
+^D
+- foo
+- bar
+- baz
+```
+
+```
+% pandoc -f html -t markdown-raw_html-bracketed_spans-native_spans
+<ul>
+<li>foo</li>
+<li id="id">bar<ul><li>subbar</li></ul></li>
+<li>baz</li>
+</ul>
+^D
+- foo
+- bar
+ - subbar
+- baz
+```
+
+
+```
+% pandoc -f html -t markdown
+<ul>
+<li>foo</li>
+<li id="id">bar</li>
+<li>baz</li>
+</ul>
+^D
+- foo
+- [bar]{#id}
+- baz
+```
+
+
+```
+% pandoc -f html -t markdown
+<ul>
+<li><p>foo</p></li>
+<li id="id"><p>bar</p></li>
+<li><p>baz</p></li>
+</ul>
+^D
+- foo
+
+- <div id="id">
+
+ bar
+
+ </div>
+
+- baz
+
+```