Skip to content

Commit

Permalink
Typst reader: ignore 'pad' and just parse its body.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jul 7, 2024
1 parent 9aea033 commit 36debf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Text/Pandoc/Readers/Typst.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 36debf7

Please sign in to comment.