Markdown reader: Allow blank space at end of horizontal rules.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1480 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2008-11-01 22:58:44 +00:00
parent a24d107e6f
commit 412315b530
4 changed files with 14 additions and 3 deletions

View file

@ -314,7 +314,7 @@ hrule = try $ do
skipSpaces
start <- oneOf hruleChars
count 2 (skipSpaces >> char start)
skipMany (skipSpaces >> char start)
skipMany (oneOf spaceChars <|> char start)
newline
optional blanklines
return HorizontalRule

View file

@ -50,7 +50,9 @@ pandoc (1.1)
blank lines in the output.
+ Allow URLs with spaces in them in links and references, but escape
them as "%20".
them as "%20".
+ Allow blank space at the end of horizontal rules.
* HTML writer:

View file

@ -7,5 +7,8 @@ Pandoc (Meta [] [] "")
, Para [TeX "\\start[a2]\n\\start[a2]\n\\stop[a2]\n\\stop[a2]"]
, Header 2 [Str "URLs",Space,Str "with",Space,Str "spaces"]
, Para [Link [Str "foo"] ("/bar%20and%20baz",""),Space,Link [Str "foo"] ("/bar%20and%20baz",""),Space,Link [Str "foo"] ("/bar%20and%20baz",""),Space,Link [Str "foo"] ("bar%20baz","title")]
, Para [Link [Str "baz"] ("/foo%20foo",""),Space,Link [Str "bam"] ("/foo%20fee",""),Space,Link [Str "bork"] ("/foo/zee%20zob","title")] ]
, 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 ]

View file

@ -35,3 +35,9 @@
[bam]: /foo fee
[bork]: /foo/zee zob (title)
## Horizontal rules with spaces at end
* * * * *
-- - -- -- -