aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+
+* * * * *
+
+-- - -- -- -
+