git.iko.soy/typeable/pandoc
on master help sign in
Fixed two bugs in HTML reader:

+ <code>...</code> not surrounded by <pre> should count as inline HTML, not code block. + parser for minimized attributes should not swallow trailing spaces git-svn-id: https://pandoc.googlecode.com/svn/trunk@1015 788f1e2b-df1e-0410-8736-df70ead52e1b

commit28c2ee396ccae2693ca50c61fb7f751493787ed0 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 14 Sep 2007, 22:40 (19 years ago) parent85f655c
1 file changed+4−11
src/Text/Pandoc/Readers/HTML.hs+4−11
src/Text/Pandoc/Readers/HTML.hs+4−11
@@ -151,8 +151,7 @@ htmlAttribute = htmlRegularAttribute <|> htmlMinimizedAttribute
151151htmlMinimizedAttribute = try $ do
152152 many1 space
153153 name <- many1 (choice [letter, oneOf ".-_:"])
154− spaces
155− notFollowedBy (char '=')
154+ notFollowedBy (spaces >> char '=')
156155 let content = name
157156 return (name, content, (" " ++ name))
158157
@@ -319,19 +318,13 @@ hrule = try $ do
319318-- code blocks
320319--
321320
322−codeBlock = preCodeBlock <|> bareCodeBlock <?> "code block"
323−
324−preCodeBlock = try $ do
321+codeBlock = try $ do
325322 htmlTag "pre"
326323 spaces
327− result <- bareCodeBlock
328− spaces
329− htmlEndTag "pre"
330− return result
331−
332−bareCodeBlock = try $ do
333324 htmlTag "code"
334325 result <- manyTill anyChar (htmlEndTag "code")
326+ spaces
327+ htmlEndTag "pre"
335328 return $ CodeBlock $ stripTrailingNewlines $
336329 decodeCharacterReferences result
337330