diff options
| author | Marc Schreiber <schrieveslaach@online.de> | 2017-05-04 16:48:27 +0200 |
|---|---|---|
| committer | Marc Schreiber <schrieveslaach@online.de> | 2017-05-04 16:48:27 +0200 |
| commit | 4ed6d9165672917cb9450578c8f7d84121ecfc24 (patch) | |
| tree | 7875ecbbbcf7a25aeef8e904e86fed7e15a7df14 | |
| parent | 1728d4e60983e050be4bfb5b8c2e6065b4dd198a (diff) | |
| download | pandoc-4ed6d9165672917cb9450578c8f7d84121ecfc24.tar.gz | |
\textcolor will be parse as span at the beginning of a paragraph
| -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"]]]] |
