diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 9 | ||||
-rw-r--r-- | test/Tests/Readers/Muse.hs | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 7b6da1174..f4aca92d0 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -592,7 +592,7 @@ inlineList = [ whitespace ] inline :: PandocMonad m => MuseParser m (F Inlines) -inline = choice [endline, linebreak] <|> choice inlineList <?> "inline" +inline = endline <|> choice inlineList <?> "inline" endline :: PandocMonad m => MuseParser m (F Inlines) endline = try $ do @@ -626,13 +626,6 @@ footnote = try $ do let contents' = runF contents st { stateNotes' = M.empty } return $ B.note contents' -linebreak :: PandocMonad m => MuseParser m (F Inlines) -linebreak = try $ do - skipMany spaceChar - newline - notFollowedBy newline - return $ return B.space - whitespace :: PandocMonad m => MuseParser m (F Inlines) whitespace = try $ do skipMany1 spaceChar diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 0ceed0322..d93704e08 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -119,6 +119,12 @@ tests = , "Linebreak" =: "Line <br> break" =?> para ("Line" <> linebreak <> "break") + , "Trailing whitespace inside paragraph" =: + T.unlines [ "First line " -- trailing whitespace here + , "second line" + ] + =?> para "First line\nsecond line" + , "Non-breaking space" =: "Foo~~bar" =?> para "Foo\160bar" , "Single ~" =: "Foo~bar" =?> para "Foo~bar" |