aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-11-01 22:58:44 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-11-01 22:58:44 +0000
commit412315b530706ef88b534cec8cd8d32b29271a54 (patch)
tree88d3be96a9002c30d4e6634bbef1ba7999630f7d
parenta24d107e6f9247af0cefc73e797ad4aa441af7e3 (diff)
downloadpandoc-412315b530706ef88b534cec8cd8d32b29271a54.tar.gz
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
-rw-r--r--Text/Pandoc/Readers/Markdown.hs2
-rw-r--r--changelog4
-rw-r--r--tests/markdown-reader-more.native5
-rw-r--r--tests/markdown-reader-more.txt6
4 files changed, 14 insertions, 3 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs
index 205472d29..f6d2f9805 100644
--- a/Text/Pandoc/Readers/Markdown.hs
+++ b/Text/Pandoc/Readers/Markdown.hs
@@ -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
diff --git a/changelog b/changelog
index 4fc629db6..241a224c7 100644
--- a/changelog
+++ b/changelog
@@ -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:
diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native
index 3d38e7a9a..c3c745510 100644
--- a/tests/markdown-reader-more.native
+++ b/tests/markdown-reader-more.native
@@ -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 ]
diff --git a/tests/markdown-reader-more.txt b/tests/markdown-reader-more.txt
index d26274d6a..ccc9d3a0a 100644
--- a/tests/markdown-reader-more.txt
+++ b/tests/markdown-reader-more.txt
@@ -35,3 +35,9 @@
[bam]: /foo fee
[bork]: /foo/zee zob (title)
+## Horizontal rules with spaces at end
+
+* * * * *
+
+-- - -- -- -
+