Typst reader: fix an incomplete pattern match.

See #9807.
This commit is contained in:
John MacFarlane
2024-05-27 14:53:00 -07:00
parent fa01764a0e
commit 2e1f17a09f
+4 -2
View File
@@ -105,8 +105,10 @@ pInline = try $ do
B.math . writeTeX <$> pMathMany (Seq.singleton res)
Elt name@(Identifier tname) pos fields -> do
labs <- sLabels <$> getState
labelTarget <- (do VLabel t <- getField "target" fields
True <$ guard (t `elem` labs))
labelTarget <- (do result <- getField "target" fields
case result of
VLabel t | t `elem` labs -> pure True
_ -> pure False)
<|> pure False
if tname == "ref" && not labelTarget
then do