aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-03-09 08:33:13 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2016-03-09 08:33:13 -0800
commit4ed64835cb475f3da80ed7b729516c7a90891d94 (patch)
treeaeddf295fecf1f477d61da0ca5158a6289722312
parent6bfaa5ad15d2c3acfc61ddf5ec442ca733016373 (diff)
downloadpandoc-4ed64835cb475f3da80ed7b729516c7a90891d94.tar.gz
Markdown reader: don't cross line boundary parsing pipe table row.
Previously an emph element could be parsed across the newline at the end of the pipe table row. I thought this would help with #2765, but it doesn't.
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 587726084..0eeda0fee 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1372,7 +1372,13 @@ sepPipe = try $ do
-- parse a row, also returning probable alignments for org-table cells
pipeTableRow :: MarkdownParser (F [Blocks])
-pipeTableRow = do
+pipeTableRow = try $ do
+ scanForPipe
+ raw <- anyLine
+ parseFromString pipeTableRow' (raw ++ "\n")
+
+pipeTableRow' :: MarkdownParser (F [Blocks])
+pipeTableRow' = do
skipMany spaceChar
openPipe <- (True <$ char '|') <|> return False
let cell = mconcat <$>