Gobble space after Plain blocks containing only raw html inline.

Otherwise following header blocks are not parsed correctly,
since the parser sees blank space before them.  Resolves
Issue #124.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1534 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher
2009-01-31 18:30:44 +00:00
parent cdd3b67a05
commit 9b27f59fc2
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -612,7 +612,7 @@ para = try $ do
return $ Para $ normalizeSpaces result
plain :: GenParser Char ParserState Block
plain = many1 inline >>= return . Plain . normalizeSpaces
plain = many1 inline >>~ spaces >>= return . Plain . normalizeSpaces
--
-- raw html
+4 -1
View File
@@ -10,5 +10,8 @@ Pandoc (Meta [] [] "")
, Para [Link [Str "baz"] ("/foo%20foo",""),Space,Link [Str "bam"] ("/foo%20fee",""),Space,Link [Str "bork"] ("/foo/zee%20zob","title")]
, Header 2 [Str "Horizontal",Space,Str "rules",Space,Str "with",Space,Str "spaces",Space,Str "at",Space,Str "end"]
, HorizontalRule
, HorizontalRule ]
, HorizontalRule
, Header 2 [Str "Raw",Space,Str "HTML",Space,Str "before",Space,Str "header"]
, Plain [HtmlInline "<a>",HtmlInline "</a>"]
, Header 3 [Str "my",Space,Str "header"] ]
+6
View File
@@ -41,3 +41,9 @@
-- - -- -- -
## Raw HTML before header
<a></a>
### my header