diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-11-01 21:05:33 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-11-01 21:05:33 +0000 |
commit | 0e4eb8374992298366b6b003b5f97c7cd8868349 (patch) | |
tree | 6eee4db2e9ad133f7063855e23e6e311f0d26523 /tests | |
parent | c43e40904e6a88a1e0f6f286dd223fcdf82d51bd (diff) | |
download | pandoc-0e4eb8374992298366b6b003b5f97c7cd8868349.tar.gz |
Markdown reader: cleaner handling of spaces in URLs.
Consecutive spaces are now collapsed into one %20, and
final spaces are removed. Also, a test case has been added.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1477 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'tests')
-rw-r--r-- | tests/markdown-reader-more.native | 5 | ||||
-rw-r--r-- | tests/markdown-reader-more.txt | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native index 5fea0f02d..3d38e7a9a 100644 --- a/tests/markdown-reader-more.native +++ b/tests/markdown-reader-more.native @@ -4,5 +4,8 @@ Pandoc (Meta [] [] "") , Para [Link [Str "foo"] ("/url",""),Space,Str "and",Space,Link [Str "bar"] ("/url","title")] , Header 2 [Str "Raw",Space,Str "ConTeXt",Space,Str "environments"] , Para [TeX "\\placeformula",Space,TeX "\\startformula\n L_{1} = L_{2}\n \\stopformula"] -, Para [TeX "\\start[a2]\n\\start[a2]\n\\stop[a2]\n\\stop[a2]"] ] +, 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")] ] diff --git a/tests/markdown-reader-more.txt b/tests/markdown-reader-more.txt index 6c6191fad..d26274d6a 100644 --- a/tests/markdown-reader-more.txt +++ b/tests/markdown-reader-more.txt @@ -22,3 +22,16 @@ \stop[a2] \stop[a2] +## URLs with spaces + +[foo](/bar and baz) +[foo](/bar and baz ) +[foo]( /bar and baz ) +[foo](bar baz "title" ) + +[baz][] [bam][] [bork][] + +[baz]: /foo foo +[bam]: /foo fee +[bork]: /foo/zee zob (title) + |