aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-06-23 12:41:47 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-06-23 12:42:27 -0700
commite03ed7377cfd3d64d65f186aa76b17417a4e4fde (patch)
tree882a3fb8b5076f618b32a451d6d952fa1cc97515
parentcab16024fcba447f64b0254f54f3e0b4dd93bb99 (diff)
downloadpandoc-e03ed7377cfd3d64d65f186aa76b17417a4e4fde.tar.gz
Markdown reader: Combine consecutive latex environments.
This helps when you have two minipages which can't have blank lines between them. See #690, #1196.
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 6c710c8ff..690256224 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -939,8 +939,10 @@ rawVerbatimBlock = try $ do
rawTeXBlock :: MarkdownParser (F Blocks)
rawTeXBlock = do
guardEnabled Ext_raw_tex
- result <- (B.rawBlock "latex" <$> rawLaTeXBlock)
- <|> (B.rawBlock "context" <$> rawConTeXtEnvironment)
+ result <- (B.rawBlock "latex" . concat <$>
+ rawLaTeXBlock `sepEndBy1` blankline)
+ <|> (B.rawBlock "context" . concat <$>
+ rawConTeXtEnvironment `sepEndBy1` blankline)
spaces
return $ return result