mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
allow \~ to escape as ~
This commit is contained in:
parent
ca82b8db3a
commit
4c11f72496
|
@ -549,7 +549,7 @@ func leftAngle(p *parser, out *bytes.Buffer, data []byte, offset int) int {
|
|||
}
|
||||
|
||||
// '\\' backslash escape
|
||||
var escapeChars = []byte("\\`*_{}[]()#+-.!:|&<>")
|
||||
var escapeChars = []byte("\\`*_{}[]()#+-.!:|&<>~")
|
||||
|
||||
func escape(p *parser, out *bytes.Buffer, data []byte, offset int) int {
|
||||
data = data[offset:]
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
<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 @@ Bang: \!
|
|||
Plus: \+
|
||||
|
||||
Minus: \-
|
||||
|
||||
Tilde: \~
|
||||
</code></pre>
|
||||
|
||||
<p>Nor should these, which occur in code spans:</p>
|
||||
|
@ -101,6 +105,8 @@ Minus: \-
|
|||
|
||||
<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>
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ Plus: \+
|
|||
|
||||
Minus: \-
|
||||
|
||||
Tilde: \~
|
||||
|
||||
|
||||
|
||||
These should not, because they occur within a code block:
|
||||
|
@ -68,6 +70,8 @@ These should not, because they occur within a code block:
|
|||
|
||||
Minus: \-
|
||||
|
||||
Tilde: \~
|
||||
|
||||
|
||||
Nor should these, which occur in code spans:
|
||||
|
||||
|
@ -103,6 +107,8 @@ Plus: `\+`
|
|||
|
||||
Minus: `\-`
|
||||
|
||||
Tilde: `\~`
|
||||
|
||||
|
||||
These should get escaped, even though they're matching pairs for
|
||||
other Markdown constructs:
|
||||
|
|
Loading…
Reference in New Issue
Block a user