aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-06-13 16:26:04 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-06-13 16:31:37 -0700
commit15c667c7595cac33420be4ae9f2dfe2b6f57b921 (patch)
tree54fa5fdf9938e064c49a8aa8ed9035bf8c329172
parentcae7dfd1c7bddf42702e728a07eae038f52c95b8 (diff)
Added test cases with a literal backslash in a link destination.
See jgm/commonmark.js#45.
-rw-r--r--spec.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec.txt b/spec.txt
index ffaa8a2..ac2ce2a 100644
--- a/spec.txt
+++ b/spec.txt
@@ -1953,6 +1953,17 @@ The link destination may not be omitted:
<p>[foo]</p>
.
+Both title and destination can contain backslash escapes
+and literal backslashes:
+
+.
+[foo]: /url\bar\*baz "foo\"bar\baz"
+
+[foo]
+.
+<p><a href="/url%5Cbar*baz" title="foo&quot;bar\baz">foo</a></p>
+.
+
A link can come before its corresponding definition:
.
@@ -5978,6 +5989,15 @@ in Markdown:
<p><a href="foo):">link</a></p>
.
+Note that a backslash before a non-escapable character is
+just a backslash:
+
+.
+[link](foo\bar)
+.
+<p><a href="foo%5Cbar">link</a></p>
+.
+
URL-escaping should be left alone inside the destination, as all
URL-escaped characters are also valid URL characters. HTML entities in
the destination will be parsed into the corresponding unicode