@@ -575,13 +575,6 @@ enclosedInlines :: (PandocMonad m, Show a, Show b)
575enclosedInlines start end = try $
575enclosedInlines start end = try $
576 trimInlinesF . mconcat <$> enclosed start end inline
576 trimInlinesF . mconcat <$> enclosed start end inline
578−verbatimBetween :: PandocMonad m
580− -> MuseParser m String
581−verbatimBetween c = try $ do
583− many1Till anyChar $ char c
585inlineTag :: PandocMonad m
578inlineTag :: PandocMonad m
586 => (Inlines -> Inlines)
579 => (Inlines -> Inlines)
587 -> String
580 -> String
@@ -617,9 +610,13 @@ code = try $ do
617 sp <- if sourceColumn pos == 1
610 sp <- if sourceColumn pos == 1
618 then pure mempty
611 then pure mempty
619 else skipMany1 spaceChar >> pure B.space
612 else skipMany1 spaceChar >> pure B.space
620− cd <- verbatimBetween '='
613+ char '='
614+ contents <- many1Till (noneOf "\n\r" <|> (newline <* notFollowedBy newline)) $ char '='
615+ guard $ not $ null contents
616+ guard $ head contents `notElem` " \t\n"
617+ guard $ last contents `notElem` " \t\n"
621 notFollowedBy nonspaceChar
618 notFollowedBy nonspaceChar
622− return $ return (sp B.<> B.code cd)
619+ return $ return (sp B.<> B.code contents)
624codeTag :: PandocMonad m => MuseParser m (F Inlines)
621codeTag :: PandocMonad m => MuseParser m (F Inlines)
625codeTag = do
622codeTag = do