\textcolor will be parse as span at the beginning of a paragraph
This commit is contained in:
parent
1728d4e609
commit
4ed6d91656
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -5,6 +5,13 @@ Hello \textcolor{red}{World}
|
|||
[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "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}}
|
||||
|
|
Loading…
Reference in a new issue