diff options
author | Alexander <ilabdsf@gmail.com> | 2017-08-23 02:34:19 +0300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-08-22 16:34:18 -0700 |
commit | c7d4fd8cf13adb905a8185a7d2fb359e06481184 (patch) | |
tree | b5fdb81c58e75f44e7e5d2ba32e4c833491a76ab /src/Text/Pandoc/Readers | |
parent | 41baaff32737e57dd9ec0a1153416ca24a12dca1 (diff) | |
download | pandoc-c7d4fd8cf13adb905a8185a7d2fb359e06481184.tar.gz |
Muse reader: do not allow closing tags with EOF (#3863)
This behavior is compatible to Amusewiki
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 5 |
1 files changed, 2 insertions, 3 deletions
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) |