aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-07-06 23:24:39 -0700
committerJohn MacFarlane <[email protected]>2024-07-06 23:25:49 -0700
commit36debf75a67ab8e1fa1469d9b54e7fa59c3fb3a9 (patch)
tree52e3592d6326017da6da6a46ce841d2a9860cce9
parent9aea033cc6a67fbec6ae3d760093839d6cdda720 (diff)
Typst reader: ignore 'pad' and just parse its body.
See #9958.
-rw-r--r--src/Text/Pandoc/Readers/Typst.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Typst.hs b/src/Text/Pandoc/Readers/Typst.hs
index 128c919c4..bd8dc78e2 100644
--- a/src/Text/Pandoc/Readers/Typst.hs
+++ b/src/Text/Pandoc/Readers/Typst.hs
@@ -365,6 +365,8 @@ blockHandlers = M.fromList
pure $ B.plain . B.text . mconcat . map toNum $ V.toList nums)
,("footnote.entry", \_ fields ->
getField "body" fields >>= pWithContents pBlocks)
+ ,("pad", \_ fields -> -- ignore paddingy
+ getField "body" fields >>= pWithContents pBlocks)
]
inlineHandlers :: PandocMonad m =>
@@ -499,6 +501,8 @@ inlineHandlers = M.fromList
body <- getField "body" fields
display <- getField "block" fields
(if display then B.displayMath else B.math) . writeTeX <$> pMathMany body)
+ ,("pad", \_ fields -> -- ignore paddingy
+ getField "body" fields >>= pWithContents pInlines)
]
getInlineBody :: PandocMonad m => M.Map Identifier Val -> P m (Seq Content)