aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorMarc Schreiber <schrieveslaach@online.de>2017-05-23 17:31:42 -0300
committerMarc Schreiber <schrieveslaach@online.de>2017-05-23 17:31:42 -0300
commit29a4bdc68131d3925a55e0428b35c6a4f75f86e0 (patch)
tree475565061889f1a200d7877bcb78d5abef925d25 /src/Text/Pandoc
parent4ed6d9165672917cb9450578c8f7d84121ecfc24 (diff)
downloadpandoc-29a4bdc68131d3925a55e0428b35c6a4f75f86e0.tar.gz
Add suggestions of @jgm: parse bracketed stuff as inlines
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index a34be46e2..6b44df468 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -418,9 +418,15 @@ blockCommands = M.fromList $
blockTextcolor :: PandocMonad m => LP m Blocks
blockTextcolor = do
- skipopts
- color <- braced
- divWith ("",[],[("style","color: " ++ color)]) <$> grouped block <* notFollowedBy inline
+ skipopts
+ color <- braced
+ let constructor = divWith ("",[],[("style","color: " ++ color)])
+ inlineContents <|> constructor <$> blockContents
+ where inlineContents = do
+ ils <- grouped inline
+ rest <- inlines
+ return (para (ils <> rest))
+ blockContents = grouped block
graphicsPath :: PandocMonad m => LP m Blocks
graphicsPath = do