Markdown reader: Combine consecutive latex environments.

This helps when you have two minipages which can't have
blank lines between them.

See #690, #1196.
This commit is contained in:
John MacFarlane 2014-06-23 12:41:47 -07:00
parent cab16024fc
commit e03ed7377c

View file

@ -939,8 +939,10 @@ rawVerbatimBlock = try $ do
rawTeXBlock :: MarkdownParser (F Blocks) rawTeXBlock :: MarkdownParser (F Blocks)
rawTeXBlock = do rawTeXBlock = do
guardEnabled Ext_raw_tex guardEnabled Ext_raw_tex
result <- (B.rawBlock "latex" <$> rawLaTeXBlock) result <- (B.rawBlock "latex" . concat <$>
<|> (B.rawBlock "context" <$> rawConTeXtEnvironment) rawLaTeXBlock `sepEndBy1` blankline)
<|> (B.rawBlock "context" . concat <$>
rawConTeXtEnvironment `sepEndBy1` blankline)
spaces spaces
return $ return result return $ return result