diff options
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 | ||||
-rw-r--r-- | test/command/textcolor.md | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 58ed97b04..a34be46e2 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -420,7 +420,7 @@ blockTextcolor :: PandocMonad m => LP m Blocks blockTextcolor = do skipopts color <- braced - divWith ("",[],[("style","color: " ++ color)]) <$> grouped block + divWith ("",[],[("style","color: " ++ color)]) <$> grouped block <* notFollowedBy inline graphicsPath :: PandocMonad m => LP m Blocks graphicsPath = do diff --git a/test/command/textcolor.md b/test/command/textcolor.md index aa3593822..59b0f6a16 100644 --- a/test/command/textcolor.md +++ b/test/command/textcolor.md @@ -7,6 +7,13 @@ Hello \textcolor{red}{World} ``` % pandoc -f latex -t native +\textcolor{red}{Hello} World +^D +[Para [Span ("",[],[("style","color: red")]) [Str "Hello"],Space,Str "World"]] +``` + +``` +% pandoc -f latex -t native Hello \textcolor{blue}{\textbf{World}} ^D [Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]]]] |