git.iko.soy/typeable/pandoc
on master help sign in
\textcolor will be parse as span at the beginning of a paragraph
commit4ed6d9165672917cb9450578c8f7d84121ecfc24 authorMarc Schreiber <schrieveslaach@online.de> dateThu 4 May 2017, 16:48 (10 years ago) parent1728d4e
2 files changed+8−1
src/Text/Pandoc/Readers/LaTeX.hs+1−1 test/command/textcolor.md+7
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -420,7 +420,7 @@ blockTextcolor :: PandocMonad m => LP m Blocks
420420blockTextcolor = do
421421 skipopts
422422 color <- braced
423− divWith ("",[],[("style","color: " ++ color)]) <$> grouped block
423+ divWith ("",[],[("style","color: " ++ color)]) <$> grouped block <* notFollowedBy inline
424424
425425graphicsPath :: PandocMonad m => LP m Blocks
426426graphicsPath = do
test/command/textcolor.md+7
@@ -5,6 +5,13 @@ Hello \textcolor{red}{World}
55[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
66```
77
8+```
9+% pandoc -f latex -t native
10+\textcolor{red}{Hello} World
11+^D
12+[Para [Span ("",[],[("style","color: red")]) [Str "Hello"],Space,Str "World"]]
13+```
14+
815```
916% pandoc -f latex -t native
1017Hello \textcolor{blue}{\textbf{World}}