diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2024-01-05 22:09:36 -0800 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2024-01-05 22:09:36 -0800 |
| commit | 9f58a552800b52def52ce2a69c5e7eb8269e4d5b (patch) | |
| tree | 1fc80f37c79a003febbaa25f163672af2bd193ec | |
| parent | e24002ed7507c8f7f391db16e5c54acaeba532db (diff) | |
Typst reader: fix handling of `\overline`.
Due to a typo, it was being incorrectly rendered as an `\underset`.
Closes #9294.
| -rw-r--r-- | src/Text/Pandoc/Readers/Typst/Math.hs | 2 | ||||
| -rw-r--r-- | test/typst-reader.native | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Typst/Math.hs b/src/Text/Pandoc/Readers/Typst/Math.hs index e1c584675..fdd6771a8 100644 --- a/src/Text/Pandoc/Readers/Typst/Math.hs +++ b/src/Text/Pandoc/Readers/Typst/Math.hs @@ -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 diff --git a/test/typst-reader.native b/test/typst-reader.native index 740cc65ab..0e00bc1ab 100644 --- a/test/typst-reader.native +++ b/test/typst-reader.native @@ -1674,7 +1674,7 @@ Pandoc , Space , Str "or" , Space - , Math InlineMath "\\underset{\175}{A}" + , Math InlineMath "\\overline{A}" , Space , Str "with" , Space @@ -2042,7 +2042,7 @@ Pandoc , Space , Str "produces" , Space - , Math InlineMath "\\underset{\175}{x + y}" + , Math InlineMath "\\overline{x + y}" , Str "," , Space , Str "and" |
