/test/bugs/unfixed/blanks-around-nested-blocks-1.t2t

http://txt2tags.googlecode.com/ · Unknown · 38 lines · 28 code · 10 blank · 0 comment · 0 complexity · 1f88fbdb35a4c8dd66197b351086c626 MD5 · raw file

  1. %!target: html
  2. %!options: -H -o-
  3. %%%
  4. Sample output:
  5. <H2>title</H2>
  6. <UL>
  7. <LI>Item 1.
  8. <PRE>
  9. Verbatim block
  10. </PRE>
  11. <LI>Item 2.
  12. </UL>
  13. There should be a blank line before <PRE>.
  14. It is not added because PRE is nested inside the list, and _should_add_blank_line() does not handle nested blocks very well. It asks BLOCK.last content to decide if the opening blank line should be added, but it fails because BLOCK.last = title (which is true, because the list is not closed yet).
  15. It must see if we're dealing with a nested block, and if so, check if we're the first block or which was the last closed block inside the list (in the case there were two consecutive PREs or something).
  16. This bug affects:
  17. test/crossing/deflist.t2t
  18. test/crossing/list.t2t
  19. test/crossing/numlist.t2t
  20. 2010-06-17
  21. %%%
  22. ==title==
  23. - Item 1.
  24. ```
  25. Verbatim block
  26. ```
  27. - Item 2.
  28. -