1085168bbf
Sync with the latest html5lib. Having the Maruku unit tests on-hand may be useful for debugging; so let's include them.
107 lines
949 B
Plaintext
107 lines
949 B
Plaintext
These should all get escaped:
|
|
|
|
Backslash: \\
|
|
|
|
Backtick: \`
|
|
|
|
Asterisk: \*
|
|
|
|
Underscore: \_
|
|
|
|
Left brace: \{
|
|
|
|
Right brace: \}
|
|
|
|
Left bracket: \[
|
|
|
|
Right bracket: \]
|
|
|
|
Left paren: \(
|
|
|
|
Right paren: \)
|
|
|
|
Greater-than: \>
|
|
|
|
Hash: \#
|
|
|
|
Period: \.
|
|
|
|
Bang: \!
|
|
|
|
Plus: \+
|
|
|
|
Minus: \-
|
|
|
|
So, these are TeX's special chars:
|
|
> \\ { } $ & # ^ _ % ~
|
|
|
|
|
|
These should not, because they occur within a code block:
|
|
|
|
Backslash: \\
|
|
|
|
Backtick: \`
|
|
|
|
Asterisk: \*
|
|
|
|
Underscore: \_
|
|
|
|
Left brace: \{
|
|
|
|
Right brace: \}
|
|
|
|
Left bracket: \[
|
|
|
|
Right bracket: \]
|
|
|
|
Left paren: \(
|
|
|
|
Right paren: \)
|
|
|
|
Greater-than: \>
|
|
|
|
Hash: \#
|
|
|
|
Period: \.
|
|
|
|
Bang: \!
|
|
|
|
Plus: \+
|
|
|
|
Minus: \-
|
|
|
|
|
|
Nor should these, which occur in code spans:
|
|
|
|
Backslash: `\\`
|
|
|
|
Backtick: `` \` ``
|
|
|
|
Asterisk: `\*`
|
|
|
|
Underscore: `\_`
|
|
|
|
Left brace: `\{`
|
|
|
|
Right brace: `\}`
|
|
|
|
Left bracket: `\[`
|
|
|
|
Right bracket: `\]`
|
|
|
|
Left paren: `\(`
|
|
|
|
Right paren: `\)`
|
|
|
|
Greater-than: `\>`
|
|
|
|
Hash: `\#`
|
|
|
|
Period: `\.`
|
|
|
|
Bang: `\!`
|
|
|
|
Plus: `\+`
|
|
|
|
Minus: `\-`
|