From e5ee5ed04ff75c577d25eaeb0f70ee3936dfe84e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 29 Dec 2025 10:10:50 -0700 Subject: RTF reader: fix bug where list items were... ...incorporated into a following table. Closes #11364. --- src/Text/Pandoc/Readers/RTF.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/RTF.hs b/src/Text/Pandoc/Readers/RTF.hs index 956acf5cd..fde444854 100644 --- a/src/Text/Pandoc/Readers/RTF.hs +++ b/src/Text/Pandoc/Readers/RTF.hs @@ -558,8 +558,9 @@ processTok bs (Tok pos tok') = do TableRow (curCell : cs) : rs [] -> [TableRow [curCell]] -- shouldn't happen , sCurrentCell = mempty } - ControlWord "intbl" _ -> - emitBlocks bs <* modifyGroup (\g -> g{ gInTable = True }) + ControlWord "intbl" _ -> do + ls <- closeLists 0 -- see #11364 + ((ls <>) <$> emitBlocks bs) <* modifyGroup (\g -> g{ gInTable = True }) ControlWord "plain" _ -> bs <$ modifyGroup (const def) ControlWord "lquote" _ -> bs <$ addText "\x2018" ControlWord "rquote" _ -> bs <$ addText "\x2019" -- cgit v1.2.3