@@ -1075,18 +1075,23 @@ inlineCommand' = try $ do
10751075 lookupListDefault raw names inlineCommands
10761076
10771077tok :: PandocMonad m => LP m Inlines
1078−tok = grouped inline <|> inlineCommand' <|> singleChar
1079− where singleChar = try $ do
1080− Tok (lin,col) toktype t <- satisfyTok (tokTypeIn [Word, Symbol])
1081− guard $ not $ toktype == Symbol &&
1082− T.any (`Set.member` specialChars) t
1083− if T.length t > 1
1084− then do
1085− let (t1, t2) = (T.take 1 t, T.drop 1 t)
1086− inp <- getInput
1087− setInput $ (Tok (lin, col + 1) toktype t2) : inp
1088− return $ str (T.unpack t1)
1089− else return $ str (T.unpack t)
1078+tok = grouped inline <|> inlineCommand' <|> singleChar'
1079+ where singleChar' = do
1080+ Tok _ _ t <- singleChar
1081+ return (str (T.unpack t))
1082+
1083+singleChar :: PandocMonad m => LP m Tok
1084+singleChar = try $ do
1085+ Tok (lin,col) toktype t <- satisfyTok (tokTypeIn [Word, Symbol])
1086+ guard $ not $ toktype == Symbol &&
1087+ T.any (`Set.member` specialChars) t
1088+ if T.length t > 1
1089+ then do
1090+ let (t1, t2) = (T.take 1 t, T.drop 1 t)
1091+ inp <- getInput
1092+ setInput $ (Tok (lin, col + 1) toktype t2) : inp
1093+ return $ Tok (lin,col) toktype t1
1094+ else return $ Tok (lin,col) toktype t
10901095
10911096opt :: PandocMonad m => LP m Inlines
10921097opt = bracketed inline
@@ -1616,7 +1621,7 @@ letmacro = do
16161621 Tok _ (CtrlSeq name) _ <- anyControlSeq
16171622 optional $ symbol '='
16181623 spaces
1619− contents <- braced <|> ((:[]) <$> anyControlSeq)
1624+ contents <- braced <|> ((:[]) <$> (anyControlSeq <|> singleChar))
16201625 return (name, Macro ExpandWhenDefined 0 Nothing contents)
16211626
16221627defmacro :: PandocMonad m => LP m (Text, Macro)