aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index caf2b7f5f..80ef01da7 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -151,8 +151,7 @@ htmlAttribute = htmlRegularAttribute <|> htmlMinimizedAttribute
htmlMinimizedAttribute = try $ do
many1 space
name <- many1 (choice [letter, oneOf ".-_:"])
- spaces
- notFollowedBy (char '=')
+ notFollowedBy (spaces >> char '=')
let content = name
return (name, content, (" " ++ name))
@@ -319,19 +318,13 @@ hrule = try $ do
-- code blocks
--
-codeBlock = preCodeBlock <|> bareCodeBlock <?> "code block"
-
-preCodeBlock = try $ do
+codeBlock = try $ do
htmlTag "pre"
spaces
- result <- bareCodeBlock
- spaces
- htmlEndTag "pre"
- return result
-
-bareCodeBlock = try $ do
htmlTag "code"
result <- manyTill anyChar (htmlEndTag "code")
+ spaces
+ htmlEndTag "pre"
return $ CodeBlock $ stripTrailingNewlines $
decodeCharacterReferences result