diff --git a/inline.go b/inline.go index 0e7cb86..39b85cc 100644 --- a/inline.go +++ b/inline.go @@ -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:] diff --git a/upskirtref/Backslash escapes.html b/upskirtref/Backslash escapes.html index 483cbdc..a73c998 100644 --- a/upskirtref/Backslash escapes.html +++ b/upskirtref/Backslash escapes.html @@ -32,6 +32,8 @@
Minus: -
+Tilde: ~
+These should not, because they occur within a code block:
Backslash: \\
@@ -65,6 +67,8 @@ Bang: \!
Plus: \+
Minus: \-
+
+Tilde: \~
Nor should these, which occur in code spans:
@@ -101,6 +105,8 @@ Minus: \-Minus: \-
Tilde: \~
These should get escaped, even though they're matching pairs for other Markdown constructs:
diff --git a/upskirtref/Backslash escapes.text b/upskirtref/Backslash escapes.text index 5b014cb..04c20bd 100644 --- a/upskirtref/Backslash escapes.text +++ b/upskirtref/Backslash escapes.text @@ -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: