@@ -773,7 +773,8 @@ inlineCommand' = try $ do
773 Tok _ (CtrlSeq name) cmd <- anyControlSeq
773 Tok _ (CtrlSeq name) cmd <- anyControlSeq
774 guard $ name /= "begin" && name /= "end"
774 guard $ name /= "begin" && name /= "end"
775 star <- option "" ("*" <$ symbol '*' <* optional sp)
775 star <- option "" ("*" <$ symbol '*' <* optional sp)
776+ overlay <- option "" overlaySpecification
776− let name' = name <> star
777+ let name' = name <> star <> overlay
777 let names = ordNub [name', name] -- check non-starred as fallback
778 let names = ordNub [name', name] -- check non-starred as fallback
778 let raw = do
779 let raw = do
779 guard $ isInlineCommand name || not (isBlockCommand name)
780 guard $ isInlineCommand name || not (isBlockCommand name)
@@ -802,19 +803,18 @@ rawopt = try $ do
802 return $ "[" <> inner <> "]"
803 return $ "[" <> inner <> "]"
804skipopts :: PandocMonad m => LP m ()
805skipopts :: PandocMonad m => LP m ()
805−skipopts = skipMany (overlaySpecification <|> void rawopt)
806+skipopts = skipMany (void overlaySpecification <|> void rawopt)
807-- opts in angle brackets are used in beamer
808-- opts in angle brackets are used in beamer
808−overlaySpecification :: PandocMonad m => LP m ()
809+overlaySpecification :: PandocMonad m => LP m Text
809overlaySpecification = try $ do
810overlaySpecification = try $ do
810 symbol '<'
811 symbol '<'
811− ts <- manyTill overlayTok (symbol '>')
812+ t <- untokenize <$> manyTill overlayTok (symbol '>')
813− -- see issue #3368
813+ -- see issue #3368
814− [Tok _ Word s] | T.all isLetter s -> s `elem`
814+ guard $ not (T.all isLetter t) ||
815− ["beamer","presentation", "trans",
815+ t `elem` ["beamer","presentation", "trans",
816− "handout","article", "second"]
816+ "handout","article", "second"]
817− _ -> True
817+ return $ "<" <> t <> ">"
819overlayTok :: PandocMonad m => LP m Tok
819overlayTok :: PandocMonad m => LP m Tok
820overlayTok =
820overlayTok =