git.iko.soy/typeable/pandoc
on master help sign in
\textcolor will be parse as span at the beginning of a paragraph
4ed6d91Marc Schreiber
src/Text/Pandoc/Readers/LaTeX.hs+1−1
@@ -420,7 +420,7 @@ blockTextcolor :: PandocMonad m => LP m Blocks
420blockTextcolor = do
420blockTextcolor = do
421 skipopts
421 skipopts
422 color <- braced
422 color <- braced
423− divWith ("",[],[("style","color: " ++ color)]) <$> grouped block
423+ divWith ("",[],[("style","color: " ++ color)]) <$> grouped block <* notFollowedBy inline
424
424
425graphicsPath :: PandocMonad m => LP m Blocks
425graphicsPath :: PandocMonad m => LP m Blocks
426graphicsPath = do
426graphicsPath = do
test/command/textcolor.md+7
@@ -5,6 +5,13 @@ Hello \textcolor{red}{World}
5[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
5[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
6```
6```
7
7
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+
8```
15```
9% pandoc -f latex -t native
16% pandoc -f latex -t native
10Hello \textcolor{blue}{\textbf{World}}
17Hello \textcolor{blue}{\textbf{World}}