aboutsummaryrefslogtreecommitdiffstats
path: root/tests2/tm-cases-new/escapes.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests2/tm-cases-new/escapes.html')
-rw-r--r--tests2/tm-cases-new/escapes.html79
1 files changed, 79 insertions, 0 deletions
diff --git a/tests2/tm-cases-new/escapes.html b/tests2/tm-cases-new/escapes.html
new file mode 100644
index 0000000..bcf6f3c
--- /dev/null
+++ b/tests2/tm-cases-new/escapes.html
@@ -0,0 +1,79 @@
+<h1>Backslash-escapes: basics</h1>
+
+<p>**don't shout**
+</p>
+
+<p>*don't emphasize*
+</p>
+
+<p>_literal underscores_
+</p>
+
+<p>__more literal underscores__
+</p>
+
+<h2>This header has trailing hash marks ##</h2>
+
+<h1>Backslash-escapes: links</h1>
+
+<p>This is not a [link](/url/).
+</p>
+
+<p>This is a link, not an image link: !<a href="/url/">link</a>.
+</p>
+
+<p>Should this be an <a href="http://autolink\">http://autolink\</a> or not?
+I'll ask on markdown-discuss.
+I suspect PHP markdown is considering this NOT an autolink.
+</p>
+
+<p>This is not a [link definition][link1] but <a href="/url/">this is</a>.
+</p>
+
+<h1>Backslash-escapse: code blocks</h1>
+
+<p>In a code block:
+</p>
+
+<pre><code>escapes should \*not\* be \_interpreted\_
+even \`backticks\`
+</code></pre>
+
+<h1>Backslash-escapse: code spans</h1>
+
+<p>Getting backticks and backslash-escapes working correctly with
+code spans can be tricky:
+</p>
+
+<p><code>a normal code span</code>
+</p>
+
+<p><code>need multiple backticks to include a literal ` backtick</code>
+</p>
+
+<p><code>`use a leading space to start a code span with a backtick</code>
+</p>
+
+<p><code>use a trailing space to end a code span with a backtick`</code>
+</p>
+
+<p><code>backslash-escapes \(are\) \*not\* \`interpreted\` in a code span</code>
+</p>
+
+<p>`<code>a code span prefixed with a literal backtick</code>
+</p>
+
+<p>`not a code span`
+</p>
+
+<p><em>Note A</em>: The <code>(?!`)</code> after the <code>\1</code> group in the
+<code>_DoCodeSpans()/_do_code_spans()</code> regex is necessary to ensure that a backtick
+doesn't match at the start of the code block (group <code>\2</code>) in an example like
+this:
+</p>
+
+<ul>
+<li>
+`<code>foo</code>
+</li>
+</ul>