summaryrefslogtreecommitdiff
path: root/tests/writer.markdown
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-04-18 10:45:46 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-04-18 10:58:50 -0700
commitd20152e01135a27decfd08dbda097fd1fda75354 (patch)
tree7fe7923a954877b446f3fefffa7c8d1c478db4b7 /tests/writer.markdown
parent0b80073e7c10d7413fd40ac70ba6bd5eaf58cd45 (diff)
Markdown writer: improved escaping.
`<` should not be escaped as `\<`, for compatibility with original Markdown. We now escape `<` and `>` with entities. Also, we now backslash-escape square brackets. Closes #2086.
Diffstat (limited to 'tests/writer.markdown')
-rw-r--r--tests/writer.markdown22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/writer.markdown b/tests/writer.markdown
index 7276b31c7..6a0b9801c 100644
--- a/tests/writer.markdown
+++ b/tests/writer.markdown
@@ -80,7 +80,7 @@ E-mail style:
>
> > nested
-This should not be a block quote: 2 \> 1.
+This should not be a block quote: 2 &gt; 1.
And a following paragraph.
@@ -581,9 +581,9 @@ AT&T is another way to write it.
This & that.
-4 \< 5.
+4 &lt; 5.
-6 \> 5.
+6 &gt; 5.
Backslash: \\
@@ -597,15 +597,15 @@ Left brace: {
Right brace: }
-Left bracket: [
+Left bracket: \[
-Right bracket: ]
+Right bracket: \]
Left paren: (
Right paren: )
-Greater-than: \>
+Greater-than: &gt;
Hash: \#
@@ -652,7 +652,7 @@ Foo [bar](/url/).
Foo [bar](/url/).
-With [embedded [brackets]](/url/).
+With [embedded \[brackets\]](/url/).
[b](/url/) by itself should be a link.
@@ -662,7 +662,7 @@ Indented [twice](/url).
Indented [thrice](/url).
-This should [not][] be a link.
+This should \[not\]\[\] be a link.
[not]: /url
@@ -716,8 +716,8 @@ Footnotes
=========
Here is a footnote reference,[^1] and another.[^2] This should *not* be a
-footnote reference, because it contains a space.[\^my note] Here is an inline
-note.[^3]
+footnote reference, because it contains a space.\[\^my note\] Here is an
+inline note.[^3]
> Notes can go in quotes.[^4]
@@ -740,7 +740,7 @@ This paragraph should not be part of the note, as it is not indented.
[^3]: This is *easier* to type. Inline notes may contain
[links](http://google.com) and `]` verbatim characters, as well as
- [bracketed text].
+ \[bracketed text\].
[^4]: In quote.