From c7d4fd8cf13adb905a8185a7d2fb359e06481184 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 23 Aug 2017 02:34:19 +0300 Subject: Muse reader: do not allow closing tags with EOF (#3863) This behavior is compatible to Amusewiki --- src/Text/Pandoc/Readers/Muse.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 924149294..f64f9d04f 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -113,11 +113,10 @@ nested p = do htmlElement :: PandocMonad m => String -> MuseParser m (Attr, String) htmlElement tag = try $ do (TagOpen _ attr, _) <- htmlTag (~== TagOpen tag []) - content <- manyTill anyChar (endtag <|> endofinput) + content <- manyTill anyChar endtag return (htmlAttrToPandoc attr, content) where - endtag = void $ htmlTag (~== TagClose tag) - endofinput = lookAhead $ try $ skipMany blankline >> skipSpaces >> eof + endtag = void $ htmlTag (~== TagClose tag) htmlAttrToPandoc :: [Attribute String] -> Attr htmlAttrToPandoc attrs = (ident, classes, keyvals) -- cgit v1.2.3