aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorAlexander <ilabdsf@gmail.com>2017-08-23 02:34:19 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-22 16:34:18 -0700
commitc7d4fd8cf13adb905a8185a7d2fb359e06481184 (patch)
treeb5fdb81c58e75f44e7e5d2ba32e4c833491a76ab /src/Text
parent41baaff32737e57dd9ec0a1153416ca24a12dca1 (diff)
downloadpandoc-c7d4fd8cf13adb905a8185a7d2fb359e06481184.tar.gz
Muse reader: do not allow closing tags with EOF (#3863)
This behavior is compatible to Amusewiki
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs5
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)