aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-10-10 11:24:28 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-10-10 11:24:28 -0700
commitc72277e98683544759d966fc88012b4f6d0fa8ec (patch)
tree19ba7d2508c838a012fc0a270bdf9fdb07d0e9cf /src/Text/Pandoc/Readers/LaTeX
parent90106c300a424349f2be5787c82fd17ccf66983f (diff)
downloadpandoc-c72277e98683544759d966fc88012b4f6d0fa8ec.tar.gz
LaTeX reader: Properly handle `\^` followed by group closing.
Closes #7615.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Inline.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Inline.hs b/src/Text/Pandoc/Readers/LaTeX/Inline.hs
index 7b8bca4af..0fd14017b 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Inline.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Inline.hs
@@ -35,7 +35,7 @@ import Text.Pandoc.Readers.LaTeX.Parsing
import Text.Pandoc.Extensions (extensionEnabled, Extension(..))
import Text.Pandoc.Parsing (getOption, updateState, getState, notFollowedBy,
manyTill, getInput, setInput, incSourceColumn,
- option, many1, try)
+ option, many1)
import Data.Char (isDigit)
import Text.Pandoc.Highlighting (fromListingsLanguage,)
import Data.Maybe (maybeToList, fromMaybe)
@@ -160,8 +160,8 @@ romanNumeralArg = spaces *> (parser <|> inBraces)
accentWith :: PandocMonad m
=> LP m Inlines -> Char -> Maybe Char -> LP m Inlines
-accentWith tok combiningAccent fallBack = try $ do
- ils <- tok
+accentWith tok combiningAccent fallBack = do
+ ils <- option mempty tok
case toList ils of
(Str (T.uncons -> Just (x, xs)) : ys) -> return $ fromList $
-- try to normalize to the combined character: