diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index b7a1ce7ad..104fa914f 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -807,8 +807,7 @@ emphasisBetween p = try $ trimInlinesF . mconcat <$ atStart <* p <* notFollowedBy space - <*> many1Till inline (try $ noSpaceBefore *> p) - <* notFollowedBy alphaNum + <*> many1Till inline (try $ noSpaceBefore *> p <* notFollowedBy alphaNum) -- | Parse an inline tag, such as @\@ and @\@. inlineTag :: PandocMonad m diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 0ca94de98..6a9919233 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -133,6 +133,10 @@ tests = "**foo *bar* baz**" =?> para (strong (text "foo " <> emph (text "bar") <> text " baz")) + , "Asterisk between words does not terminate emphasis" =: + "*foo*bar*" =?> + para (emph $ "foo*bar") + , test emacsMuse "Underline" ("_Underline_" =?> para (underlineSpan "Underline"))