all repos — grayfriday @ f3ab1849e6b17a1564b9088d01fee399a83cddd7

blackfriday fork with a few changes

Merge pull request #39 from athom/tilde-escape

allow \~ to escape as ~
Vytautas Ĺ altenis vytas@rtfb.lt
Sat, 03 May 2014 16:01:58 +0300
commit

f3ab1849e6b17a1564b9088d01fee399a83cddd7

parent

b7820521193985070619230f0b4e091baa753252

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

jump to
M inline.goinline.go

@@ -555,7 +555,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