Skip to content

Commit

Permalink
Typst reader: fix handling of \overline.
Browse files Browse the repository at this point in the history
Due to a typo, it was being incorrectly rendered as an `\underset`.
Closes #9294.
  • Loading branch information
jgm committed Jan 6, 2024
1 parent e24002e commit 9f58a55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Readers/Typst/Math.hs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ handleMath tok =
<$> (getField "body" fields >>= pMathGrouped)
<*> pure (ESymbol TUnder "_")
Elt "math.overline" _ fields ->
EUnder False
EOver False
<$> (getField "body" fields >>= pMathGrouped)
<*> pure (ESymbol TOver "\175")
Elt "math.underbrace" _ fields -> do
Expand Down
4 changes: 2 additions & 2 deletions test/typst-reader.native
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ Pandoc
, Space
, Str "or"
, Space
, Math InlineMath "\\underset{\175}{A}"
, Math InlineMath "\\overline{A}"
, Space
, Str "with"
, Space
Expand Down Expand Up @@ -2042,7 +2042,7 @@ Pandoc
, Space
, Str "produces"
, Space
, Math InlineMath "\\underset{\175}{x + y}"
, Math InlineMath "\\overline{x + y}"
, Str ","
, Space
, Str "and"
Expand Down

0 comments on commit 9f58a55

Please sign in to comment.