Skip to content

Commit 36debf7

Browse files
committed
Typst reader: ignore 'pad' and just parse its body.
See #9958.
1 parent 9aea033 commit 36debf7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Text/Pandoc/Readers/Typst.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ blockHandlers = M.fromList
365365
pure $ B.plain . B.text . mconcat . map toNum $ V.toList nums)
366366
,("footnote.entry", \_ fields ->
367367
getField "body" fields >>= pWithContents pBlocks)
368+
,("pad", \_ fields -> -- ignore paddingy
369+
getField "body" fields >>= pWithContents pBlocks)
368370
]
369371

370372
inlineHandlers :: PandocMonad m =>
@@ -499,6 +501,8 @@ inlineHandlers = M.fromList
499501
body <- getField "body" fields
500502
display <- getField "block" fields
501503
(if display then B.displayMath else B.math) . writeTeX <$> pMathMany body)
504+
,("pad", \_ fields -> -- ignore paddingy
505+
getField "body" fields >>= pWithContents pInlines)
502506
]
503507

504508
getInlineBody :: PandocMonad m => M.Map Identifier Val -> P m (Seq Content)

0 commit comments

Comments
 (0)