diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-08-12 11:10:48 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-08-12 11:10:48 -0700 |
commit | f97ec6db2c66c25e0a62500939ce1a848a7587b0 (patch) | |
tree | 757aee33c969280c07f95e5e38147949fa20c703 /tests | |
parent | ab75e1d3bdf830875b02602055cbff29ba63e1fb (diff) | |
download | pandoc-f97ec6db2c66c25e0a62500939ce1a848a7587b0.tar.gz |
Markdown reader: Improved parsing of indented code in list items.
Indented code at the beginning of a list item must be indented eight
spaces from the margin (or from the edge of the container), or four
spaces past the list marker, whichever is farther.
Some examples in `tests/markdown-reader-more.txt`.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/markdown-reader-more.native | 9 | ||||
-rw-r--r-- | tests/markdown-reader-more.txt | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native index b4713bc93..3e171e085 100644 --- a/tests/markdown-reader-more.native +++ b/tests/markdown-reader-more.native @@ -22,6 +22,15 @@ ,BulletList [[Plain [Str "one",Space,RawInline (Format "html") "<!--\n- two\n-->"]] ,[Plain [Str "three"]]] +,Header 2 ("indented-code-at-beginning-of-list",[],[]) [Str "Indented",Space,Str "code",Space,Str "at",Space,Str "beginning",Space,Str "of",Space,Str "list"] +,BulletList + [[CodeBlock ("",[],[]) "code\ncode"]] +,OrderedList (1,Decimal,Period) + [[CodeBlock ("",[],[]) "code\ncode"] + ,[CodeBlock ("",[],[]) "code\ncode"]] +,BulletList + [[CodeBlock ("",[],[]) "code\ncode"] + ,[Plain [Str "no",Space,Str "code"]]] ,Header 2 ("backslash-newline",[],[]) [Str "Backslash",Space,Str "newline"] ,Para [Str "hi",LineBreak,Str "there"] ,Header 2 ("code-spans",[],[]) [Str "Code",Space,Str "spans"] diff --git a/tests/markdown-reader-more.txt b/tests/markdown-reader-more.txt index 4cd69c9d8..e1ad4f3e6 100644 --- a/tests/markdown-reader-more.txt +++ b/tests/markdown-reader-more.txt @@ -70,6 +70,22 @@ $PATH 90 $PATH --> - three +## Indented code at beginning of list + +- code + code + + 1. code + code + + 12345678. code + code + + - code + code + + - no code + ## Backslash newline hi\ |