diff options
| author | John MacFarlane <[email protected]> | 2023-04-14 13:01:01 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-04-14 13:01:01 -0700 |
| commit | 604d777c03ad1bd8a7f9279a255b2a693fe8c18d (patch) | |
| tree | 89af5b6285f712a74cbb33221f3e0ef682eaf175 | |
| parent | 9bcf1ff8d6823c9980ff1b9959e7a48968de0275 (diff) | |
Fix bug in RTF table parsing.
In certain cases, text before a table was being incorporated into
the table itself.
Closes #8767.
| -rw-r--r-- | src/Text/Pandoc/Readers/RTF.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/RTF.hs b/src/Text/Pandoc/Readers/RTF.hs index ca1459a41..f1aca6159 100644 --- a/src/Text/Pandoc/Readers/RTF.hs +++ b/src/Text/Pandoc/Readers/RTF.hs @@ -541,7 +541,8 @@ processTok bs (Tok pos tok') = do TableRow (curCell : cs) : rs [] -> [TableRow [curCell]] -- shouldn't happen , sCurrentCell = mempty } - ControlWord "intbl" _ -> bs <$ modifyGroup (\g -> g{ gInTable = True }) + ControlWord "intbl" _ -> + emitBlocks bs <* modifyGroup (\g -> g{ gInTable = True }) ControlWord "plain" _ -> bs <$ modifyGroup (const def) ControlWord "lquote" _ -> bs <$ addText "\x2018" ControlWord "rquote" _ -> bs <$ addText "\x2019" |
