all repos — grayfriday @ 4c11f724964a4a397db939de7b8f87fcc091637e

blackfriday fork with a few changes

allow \~ to escape as ~
athom athom@126.com
Tue, 01 Oct 2013 15:15:55 +0800
commit

4c11f724964a4a397db939de7b8f87fcc091637e

parent

ca82b8db3a85c5da858a1ec7c344872626ea2e81

3 files changed, 13 insertions(+), 1 deletions(-)

jump to
M inline.goinline.go

@@ -549,7 +549,7 @@ return end

} // '\\' backslash escape -var escapeChars = []byte("\\`*_{}[]()#+-.!:|&<>") +var escapeChars = []byte("\\`*_{}[]()#+-.!:|&<>~") func escape(p *parser, out *bytes.Buffer, data []byte, offset int) int { data = data[offset:]
M upskirtref/Backslash escapes.htmlupskirtref/Backslash escapes.html

@@ -32,6 +32,8 @@ <p>Plus: +</p>

<p>Minus: -</p> +<p>Tilde: ~</p> + <p>These should not, because they occur within a code block:</p> <pre><code>Backslash: \\

@@ -65,6 +67,8 @@

Plus: \+ Minus: \- + +Tilde: \~ </code></pre> <p>Nor should these, which occur in code spans:</p>

@@ -100,6 +104,8 @@

<p>Plus: <code>\+</code></p> <p>Minus: <code>\-</code></p> + +<p>Tilde: <code>\~</code></p> <p>These should get escaped, even though they're matching pairs for other Markdown constructs:</p>
M upskirtref/Backslash escapes.textupskirtref/Backslash escapes.text

@@ -32,6 +32,8 @@ Plus: \+

Minus: \- +Tilde: \~ + These should not, because they occur within a code block:

@@ -68,6 +70,8 @@ Plus: \+

Minus: \- + Tilde: \~ + Nor should these, which occur in code spans:

@@ -102,6 +106,8 @@

Plus: `\+` Minus: `\-` + +Tilde: `\~` These should get escaped, even though they're matching pairs for