@@ -873,14 +873,11 @@ nbsp = try $ pure (B.str "\160") <$ string "~~"
873873
874874-- | Parse code markup, indicated by @\'=\'@ characters.
875875code :: PandocMonad m => MuseParser m (F Inlines)
876−code = try $ do
877− atStart $ char '='
878− contents <- many1Till (noneOf "\n\r" <|> (newline <* notFollowedBy newline)) $ char '='
879− guard $ not $ null contents
880− guard $ head contents `notElem` " \t\n"
881− guard $ last contents `notElem` " \t\n"
882− notFollowedBy $ satisfy isAlphaNum
883− return $ return $ B.code contents
876+code = try $ fmap pure $ B.code . uncurry (++)
877+ <$ atStart (char '=')
878+ <* notFollowedBy (spaceChar <|> newline)
879+ <*> manyUntil (noneOf "\n\r" <|> (newline <* notFollowedBy newline)) (try $ fmap pure $ noneOf " \t\n\r=" <* char '=')
880+ <* notFollowedBy (satisfy isAlphaNum)
884881
885882-- | Parse @\<code>@ tag.
886883codeTag :: PandocMonad m => MuseParser m (F Inlines)