Inline HTML with Markdown content.xhtml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <h1>Markdown inside code blocks</h1>
  2. <div>
  3. <p>foo</p>
  4. </div>
  5. <div>
  6. <p>foo</p>
  7. </div>
  8. <div>
  9. <p>foo</p>
  10. </div>
  11. <table>
  12. <tr><td>test <em>emphasis</em> (span)</td></tr>
  13. </table>
  14. <table>
  15. <tr><td>test <em>emphasis</em> (span)</td></tr>
  16. </table>
  17. <table>
  18. <tr><td>
  19. <p>test <em>emphasis</em> (block)</p>
  20. </td></tr>
  21. </table>
  22. <h2>More complicated</h2>
  23. <table>
  24. <tr><td>
  25. * this is <em>not</em> a list item</td></tr>
  26. <tr><td>
  27. * this is <em>not</em> a list item</td></tr>
  28. <tr><td>
  29. <ul>
  30. <li>this <em>is</em> a list item</li>
  31. </ul>
  32. </td></tr>
  33. </table>
  34. <h2>With indent</h2>
  35. <div>
  36. <div>
  37. <p>This text is no code block: if it was, the
  38. closing <code>&lt;div&gt;</code> would be too and the HTML block
  39. would be invalid.</p>
  40. <p>Markdown content in HTML blocks is assumed to be
  41. indented the same as the block opening tag.</p>
  42. <p><strong>This should be the third paragraph after the header.</strong></p>
  43. </div>
  44. </div>
  45. <h2>Code block with rogue <code>&lt;/div&gt;</code>s in Markdown code span and block</h2>
  46. <div>
  47. <div>
  48. <p>This is a code block however:</p>
  49. <pre><code>&lt;/div&gt;
  50. </code></pre>
  51. <p>Funny isn't it? Here is a code span: <code>&lt;/div&gt;</code>.</p>
  52. </div>
  53. </div>
  54. <div>
  55. <div>
  56. <ul>
  57. <li>List item, not a code block</li>
  58. </ul>
  59. <p>Some text</p>
  60. <pre><code>This is a code block.
  61. </code></pre>
  62. </div>
  63. </div>
  64. <h2>No code block in markdown span mode</h2>
  65. <p>
  66. This is not a code block since Markdown parse paragraph
  67. content as span. Code spans like <code>&lt;/p&gt;</code> are allowed though.
  68. </p>
  69. <p><em>Hello</em> <em>world</em></p>
  70. <p class="poem">
  71. line 1<br />
  72. line 2<br />
  73. line 3
  74. </p>
  75. <h2>Preserving attributes and tags on more than one line:</h2>
  76. <p class="test"
  77. id="12">
  78. Some <em>span</em> content.
  79. </p>
  80. <h2>Header confusion bug</h2>
  81. <table class="canvas">
  82. <tr>
  83. <td id="main">Hello World!
  84. ============
  85. Hello World!</td>
  86. </tr>
  87. </table>