You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

124 lines
1.7 KiB

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