diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-12 14:24:50 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-03-12 14:24:50 +0300 |
commit | c3fbc492c8795c0cd92f29f69d01819e8dccec93 (patch) | |
tree | 939436e3eb9031f6cca0654caecf2963f265f3c5 /src | |
parent | f0a029ac51affeb56cba88f76375a98293b2ea7c (diff) | |
download | pandoc-c3fbc492c8795c0cd92f29f69d01819e8dccec93.tar.gz |
Muse reader: require closing tag to have the same indentation as opening
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 293bc627c..c8868b20d 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -169,9 +169,10 @@ parseHtmlContent :: PandocMonad m => String -> MuseParser m (Attr, F Blocks) parseHtmlContent tag = try $ do many spaceChar + pos <- getPosition (TagOpen _ attr, _) <- htmlTag (~== TagOpen tag []) manyTill spaceChar eol - content <- parseBlocksTill (try $ manyTill spaceChar endtag) + content <- parseBlocksTill (try $ ((count (sourceColumn pos - 1) spaceChar) >> endtag)) manyTill spaceChar eol -- closing tag must be followed by optional whitespace and newline return (htmlAttrToPandoc attr, content) where |