all repos — grayfriday @ 819f70a832b8b87ae4195bbc917f5baf11bda08a

blackfriday fork with a few changes

upskirtref/Backslash escapes.text (view raw)

  1These should all get escaped:
  2
  3Backslash: \\
  4
  5Backtick: \`
  6
  7Asterisk: \*
  8
  9Underscore: \_
 10
 11Left brace: \{
 12
 13Right brace: \}
 14
 15Left bracket: \[
 16
 17Right bracket: \]
 18
 19Left paren: \(
 20
 21Right paren: \)
 22
 23Greater-than: \>
 24
 25Hash: \#
 26
 27Period: \.
 28
 29Bang: \!
 30
 31Plus: \+
 32
 33Minus: \-
 34
 35Tilde: \~
 36
 37
 38
 39These should not, because they occur within a code block:
 40
 41	Backslash: \\
 42
 43	Backtick: \`
 44
 45	Asterisk: \*
 46
 47	Underscore: \_
 48
 49	Left brace: \{
 50
 51	Right brace: \}
 52
 53	Left bracket: \[
 54
 55	Right bracket: \]
 56
 57	Left paren: \(
 58
 59	Right paren: \)
 60
 61	Greater-than: \>
 62
 63	Hash: \#
 64
 65	Period: \.
 66
 67	Bang: \!
 68
 69	Plus: \+
 70
 71	Minus: \-
 72
 73	Tilde: \~
 74
 75
 76Nor should these, which occur in code spans:
 77
 78Backslash: `\\`
 79
 80Backtick: `` \` ``
 81
 82Asterisk: `\*`
 83
 84Underscore: `\_`
 85
 86Left brace: `\{`
 87
 88Right brace: `\}`
 89
 90Left bracket: `\[`
 91
 92Right bracket: `\]`
 93
 94Left paren: `\(`
 95
 96Right paren: `\)`
 97
 98Greater-than: `\>`
 99
100Hash: `\#`
101
102Period: `\.`
103
104Bang: `\!`
105
106Plus: `\+`
107
108Minus: `\-`
109
110Tilde: `\~`
111
112
113These should get escaped, even though they're matching pairs for
114other Markdown constructs:
115
116\*asterisks\*
117
118\_underscores\_
119
120\`backticks\`
121
122This is a code span with a literal backslash-backtick sequence: `` \` ``
123
124This is a tag with unescaped backticks <span attr='`ticks`'>bar</span>.
125
126This is a tag with backslashes <span attr='\\backslashes\\'>bar</span>.