diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-04 15:04:47 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-04 15:04:47 -0800 |
commit | fac3953abf26d5b55fac9bdd6c74c0074660ab7a (patch) | |
tree | 2f4a73d5aee45602dde36abba984afe93770851e | |
parent | ae60e0196c5c12d358002cf3251dfebf07c66da6 (diff) | |
download | pandoc-fac3953abf26d5b55fac9bdd6c74c0074660ab7a.tar.gz |
Markdown reader: Don't parse native div as table caption.
Closes #4119.
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 2 | ||||
-rw-r--r-- | test/command/4119.md | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index a94c85c32..2d7c12e99 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1267,7 +1267,7 @@ tableCaption :: PandocMonad m => MarkdownParser m (F Inlines) tableCaption = try $ do guardEnabled Ext_table_captions skipNonindentSpaces - string ":" <|> string "Table:" + (string ":" <* notFollowedBy (string "::")) <|> string "Table:" trimInlinesF <$> inlines1 <* blanklines -- Parse a simple table with '---' header and one line per row. diff --git a/test/command/4119.md b/test/command/4119.md new file mode 100644 index 000000000..70f008643 --- /dev/null +++ b/test/command/4119.md @@ -0,0 +1,18 @@ +``` +pandoc -t native +| col1 | col2 | +| ---- | ---- | +| 1 | 2 | + +::: {.notes} ::: +not a caption! +:::::::::::::::: +^D +[Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[Plain [Str "col1"]] + ,[Plain [Str "col2"]]] + [[[Plain [Str "1"]] + ,[Plain [Str "2"]]]] +,Div ("",["notes"],[]) + [Para [Str "not",Space,Str "a",Space,Str "caption!"]]] +``` |