aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/RTF.hs
diff options
context:
space:
mode:
authorTuong Nguyen Manh <[email protected]>2025-12-28 06:42:22 +0100
committerGitHub <[email protected]>2025-12-27 22:42:22 -0700
commitd52e40d17944a3abc7a8523b9f63e999526d082a (patch)
treee00a9d08f512149febcfecdccad650b544a1940c /src/Text/Pandoc/Readers/RTF.hs
parent6e0f052b833478653099e3a30370490091ae8834 (diff)
RTF reader: Ensure new paragraph on \pard (#11361)
New paragraphs may start with \pard alone without an explicit paragraph break with \par preceding it.
Diffstat (limited to 'src/Text/Pandoc/Readers/RTF.hs')
-rw-r--r--src/Text/Pandoc/Readers/RTF.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/RTF.hs b/src/Text/Pandoc/Readers/RTF.hs
index cb60242be..956acf5cd 100644
--- a/src/Text/Pandoc/Readers/RTF.hs
+++ b/src/Text/Pandoc/Readers/RTF.hs
@@ -627,9 +627,10 @@ processTok bs (Tok pos tok') = do
modifyGroup (\g -> g{ gUnderline = boolParam mbp })
ControlWord "ulnone" _ -> bs <$
modifyGroup (\g -> g{ gUnderline = False })
- ControlWord "pard" _ -> bs <$ do
+ ControlWord "pard" _ -> do
+ newbs <- emitBlocks bs
modifyGroup (const def)
- getStyleFormatting 0 >>= foldM processTok bs
+ getStyleFormatting 0 >>= foldM processTok newbs
ControlWord "par" _ -> emitBlocks bs
_ -> pure bs