diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-02 17:04:59 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-02 17:04:59 -0800 |
commit | 5b7c209373a441c2c7b296031025baa56a9f0c43 (patch) | |
tree | b11adb2e9a4a3814db45536897fe24ad17712578 /tests | |
parent | 9001506f3398485512f46fe28ab93915d7a3314a (diff) | |
download | pandoc-5b7c209373a441c2c7b296031025baa56a9f0c43.tar.gz |
Markdown reader: Fix parsing of consecutive lists.
Pandoc previously behaved like Markdown.pl for consecutive
lists of different styles. Thus, the following would be parsed
as a single ordered list, rather than an ordered list followed
by an unordered list:
1. one
2. two
- one
- two
This patch makes pandoc behave more sensibly, parsing this as
two lists. Any change in list type (ordered/unordered) or in
list number style will trigger a new list. Thus, the following
will also be parsed as two lists:
1. one
2. two
a. one
b. two
Since we regard this as a bug in Markdown.pl, and not something
anyone would ever rely on, we do not preserve the old behavior
even when `--strict` is selected.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/markdown-reader-more.native | 12 | ||||
-rw-r--r-- | tests/markdown-reader-more.txt | 10 |
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native index 3b2221d7b..d36241a96 100644 --- a/tests/markdown-reader-more.native +++ b/tests/markdown-reader-more.native @@ -47,4 +47,14 @@ ,Para [Link [Str "bat"] ("/bat","")] ,Header 2 [Str "Curly",Space,Str "smart",Space,Str "quotes"] ,Para [Quoted DoubleQuote [Str "Hi"]] -,Para [Quoted SingleQuote [Str "Hi"]]] +,Para [Quoted SingleQuote [Str "Hi"]] +,Header 2 [Str "Consecutive",Space,Str "lists"] +,BulletList + [[Plain [Str "one"]] + ,[Plain [Str "two"]]] +,OrderedList (1,Decimal,Period) + [[Plain [Str "one"]] + ,[Plain [Str "two"]]] +,OrderedList (1,LowerAlpha,Period) + [[Plain [Str "one"]] + ,[Plain [Str "two"]]]] diff --git a/tests/markdown-reader-more.txt b/tests/markdown-reader-more.txt index 258002b8a..b99bb3121 100644 --- a/tests/markdown-reader-more.txt +++ b/tests/markdown-reader-more.txt @@ -123,3 +123,13 @@ $\tuple{x,y}$ “Hi” ‘Hi’ + +## Consecutive lists + +- one +- two +1. one +2. two + + a. one + b. two |