pandoc/tests/markdown-reader-more.native
fiddlosopher 07ae5bc264 Markdown reader: properly escape URIs.
+ Resolves Issue #220.
+ Added escapeURI function to Markdown reader. This escapes
  links in a way that makes sense for markdown.  If they've
  used URI escapes like %20 in their link, these will be preserved.
  But if they've used a special character or space without escaping
  it, it will be escaped. This should make sense in most cases.
+ Previously pandoc collapsed adjacent spaces and replaced these
  sequences of spaces with + characters.  That isn't correct for
  a URI path (+ is to be used only in the query part).  We've also
  removed the space-collapsing behavior.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1847 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-27 03:06:39 +00:00

25 lines
1.6 KiB
Text

Pandoc (Meta [] [] [])
[ Header 1 [Str "Additional",Space,Str "markdown",Space,Str "reader",Space,Str "tests"]
, Header 2 [Str "Blank",Space,Str "line",Space,Str "before",Space,Str "URL",Space,Str "in",Space,Str "link",Space,Str "reference"]
, 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]"]
, 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%20%20and%20%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")]
, Header 2 [Str "Horizontal",Space,Str "rules",Space,Str "with",Space,Str "spaces",Space,Str "at",Space,Str "end"]
, 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"]
, Header 2 [Str "$",Space,Str "in",Space,Str "math"]
, Para [Math InlineMath "\\$2 + \\$3"]
, Header 2 [Str "Commented",Str "-",Str "out",Space,Str "list",Space,Str "item"]
, BulletList
[ [ Plain [Str "one"]
, RawHtml "<!--\n- two\n-->" ], [ Plain [Str "three"] ] ]
, Header 2 [Str "Backslash",Space,Str "newline"]
, Para [Str "hi",LineBreak,Str "there"] ]