From 3496109d49bdf2de5d28435c04ef849b00d9e421 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 10 Jul 2023 21:24:23 -0700 Subject: Typst reader: fix regression in recognition of display math. The last release caused all math to be parsed as inline math. Closes #8949. --- src/Text/Pandoc/Readers/Typst.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Typst.hs b/src/Text/Pandoc/Readers/Typst.hs index b11414414..7c1b18b4e 100644 --- a/src/Text/Pandoc/Readers/Typst.hs +++ b/src/Text/Pandoc/Readers/Typst.hs @@ -95,7 +95,8 @@ pInline = try $ do Txt t -> pure $ B.text t Lab name -> pure $ B.spanWith (name, [], []) mempty Elt (Identifier tname) _ _ - | "math." `T.isPrefixOf` tname -> + | "math." `T.isPrefixOf` tname + , tname /= "math.equation" -> B.math . writeTeX <$> pMathMany (Seq.singleton res) Elt name@(Identifier tname) pos fields -> case M.lookup name inlineHandlers of -- cgit v1.2.3