diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-04-18 10:13:32 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-04-18 10:13:32 -0700 |
commit | d3544dc6f7a2386c4a68a85110f322b50332cfbe (patch) | |
tree | 423523d213fa4b89e8a8faff4271bdf3d270f871 /tests/Tests/Readers | |
parent | 10e28ef750f0c7e6bc0dfb7aabaaad8edf059e3c (diff) | |
download | pandoc-d3544dc6f7a2386c4a68a85110f322b50332cfbe.tar.gz |
Markdown definition lists: don't require indent for first line.
Previously the body of the definition (after the `:` or `~` marker)
needed to be in column 4. This commit relaxes that requirement,
to better match the behavior of PHP Markdown Extra. So, now
this is a valid definition list:
foo
: bar
This patch also helps resolve a potentially ambiguity with table
captions:
foo
: bar
-----
table
-----
Is "bar" a definition, or the caption for the table? We'll count
it as a caption for the table.
Closes #2087.
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r-- | tests/Tests/Readers/Markdown.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index 8965d1d6e..aaeefcfa4 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -270,6 +270,9 @@ tests = [ testGroup "inline code" definitionList [ (text "foo1", [para (text "bar") <> para (text "baz")]) ] + , "first line not indented" =: + "foo\n: bar\n" =?> + definitionList [ (text "foo", [plain (text "bar")]) ] ] , testGroup "+compact_definition_lists" [ test markdownCDL "basic compact list" $ |