backslash_escapes.text 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. These should all get escaped:
  2. Backslash: \\
  3. Backtick: \`
  4. Asterisk: \*
  5. Underscore: \_
  6. Left brace: \{
  7. Right brace: \}
  8. Left bracket: \[
  9. Right bracket: \]
  10. Left paren: \(
  11. Right paren: \)
  12. Greater-than: \>
  13. Hash: \#
  14. Period: \.
  15. Bang: \!
  16. Plus: \+
  17. Minus: \-
  18. These should not, because they occur within a code block:
  19. Backslash: \\
  20. Backtick: \`
  21. Asterisk: \*
  22. Underscore: \_
  23. Left brace: \{
  24. Right brace: \}
  25. Left bracket: \[
  26. Right bracket: \]
  27. Left paren: \(
  28. Right paren: \)
  29. Greater-than: \>
  30. Hash: \#
  31. Period: \.
  32. Bang: \!
  33. Plus: \+
  34. Minus: \-
  35. Nor should these, which occur in code spans:
  36. Backslash: `\\`
  37. Backtick: `` \` ``
  38. Asterisk: `\*`
  39. Underscore: `\_`
  40. Left brace: `\{`
  41. Right brace: `\}`
  42. Left bracket: `\[`
  43. Right bracket: `\]`
  44. Left paren: `\(`
  45. Right paren: `\)`
  46. Greater-than: `\>`
  47. Hash: `\#`
  48. Period: `\.`
  49. Bang: `\!`
  50. Plus: `\+`
  51. Minus: `\-`
  52. These should get escaped, even though they're matching pairs for
  53. other Markdown constructs:
  54. \*asterisks\*
  55. \_underscores\_
  56. \`backticks\`
  57. This is a code span with a literal backslash-backtick sequence: `` \` ``
  58. This is a tag with unescaped backticks <span attr='`ticks`'>bar</span>.
  59. This is a tag with backslashes <span attr='\\backslashes\\'>bar</span>.