all repos — grayfriday @ 786aed6213c0a30a525e84728e99120db20c0dd7

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
 35
 36
 37These should not, because they occur within a code block:
 38
 39	Backslash: \\
 40
 41	Backtick: \`
 42
 43	Asterisk: \*
 44
 45	Underscore: \_
 46
 47	Left brace: \{
 48
 49	Right brace: \}
 50
 51	Left bracket: \[
 52
 53	Right bracket: \]
 54
 55	Left paren: \(
 56
 57	Right paren: \)
 58
 59	Greater-than: \>
 60
 61	Hash: \#
 62
 63	Period: \.
 64
 65	Bang: \!
 66
 67	Plus: \+
 68
 69	Minus: \-
 70
 71
 72Nor should these, which occur in code spans:
 73
 74Backslash: `\\`
 75
 76Backtick: `` \` ``
 77
 78Asterisk: `\*`
 79
 80Underscore: `\_`
 81
 82Left brace: `\{`
 83
 84Right brace: `\}`
 85
 86Left bracket: `\[`
 87
 88Right bracket: `\]`
 89
 90Left paren: `\(`
 91
 92Right paren: `\)`
 93
 94Greater-than: `\>`
 95
 96Hash: `\#`
 97
 98Period: `\.`
 99
100Bang: `\!`
101
102Plus: `\+`
103
104Minus: `\-`
105
106
107These should get escaped, even though they're matching pairs for
108other Markdown constructs:
109
110\*asterisks\*
111
112\_underscores\_
113
114\`backticks\`
115
116This is a code span with a literal backslash-backtick sequence: `` \` ``
117
118This is a tag with unescaped backticks <span attr='`ticks`'>bar</span>.
119
120This is a tag with backslashes <span attr='\\backslashes\\'>bar</span>.