diff options
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/Readers/RTF.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/RTF.hs b/src/Text/Pandoc/Readers/RTF.hs index 8bf653fc1..4426ab45d 100644 --- a/src/Text/Pandoc/Readers/RTF.hs +++ b/src/Text/Pandoc/Readers/RTF.hs @@ -428,10 +428,12 @@ processTok bs (Tok pos tok') = do UnformattedText{} -> return () _ -> updateState $ \s -> s{ sEatChars = 0 } case tok' of - Grouped (Tok _ (ControlSymbol '*') : toks) -> - bs <$ (do oldTextContent <- sTextContent <$> getState - processTok mempty (Tok pos (Grouped toks)) - updateState $ \st -> st{ sTextContent = oldTextContent }) + Grouped (Tok _ (ControlSymbol '*') : toks@(firsttok:_)) -> + case firsttok of + Tok _ (ControlWord "shppict" _) -> inGroup (foldM processTok bs toks) + _ -> bs <$ (do oldTextContent <- sTextContent <$> getState + processTok mempty (Tok pos (Grouped toks)) + updateState $ \st -> st{ sTextContent = oldTextContent }) Grouped (Tok _ (ControlWord "fonttbl" _) : toks) -> inGroup $ do updateState $ \s -> s{ sFontTable = processFontTable toks } pure bs |
