diff options
| author | John MacFarlane <[email protected]> | 2023-07-25 09:18:22 -0600 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2023-07-25 09:23:16 -0600 |
| commit | 77e01242da8ab64af52a75459d42dc230282647a (patch) | |
| tree | 3769ee15e6015d1d3d9d984e2ff49e32fdd0b2ac /src | |
| parent | c06b9ab33147cea8363961929dedbd97f754e5dc (diff) | |
Typst writer: escape `//`.
So it doesn't get interpreted as a comment.
Closes #8966.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/Typst.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs index a844865aa..53edbcb0c 100644 --- a/src/Text/Pandoc/Writers/Typst.hs +++ b/src/Text/Pandoc/Writers/Typst.hs @@ -290,6 +290,7 @@ textstyle s inlines = (s <>) . brackets <$> inlinesToTypst inlines escapeTypst :: EscapeContext -> Text -> Text escapeTypst context t = + T.replace "//" "\\/\\/" $ if T.any needsEscape t then T.concatMap escapeChar t else t |
