diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 2 | ||||
-rw-r--r-- | test/Tests/Readers/Muse.hs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index d40e74c96..3e6130585 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -931,7 +931,7 @@ link = try $ do linkContent :: PandocMonad m => MuseParser m (F Inlines) linkContent = do char '[' - trimInlinesF . mconcat <$> many1Till inline (string "]") + trimInlinesF . mconcat <$> manyTill inline (string "]") linkText :: PandocMonad m => MuseParser m (String, String, Maybe (F Inlines)) linkText = do diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 3dc9b0917..7d2c8665c 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -186,6 +186,9 @@ tests = , "Link with description" =: "[[https://amusewiki.org/][A Muse Wiki]]" =?> para (link "https://amusewiki.org/" "" (text "A Muse Wiki")) + , "Link with empty description" =: + "[[https://amusewiki.org/][]]" =?> + para (link "https://amusewiki.org/" "" (text "")) , "Image" =: "[[image.jpg]]" =?> para (image "image.jpg" "" mempty) |