Inline HTML with Markdown content.text 1.8 KB

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