PageRenderTime 45ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

Unknown | 37 lines | 21 code | 16 blank | 0 comment | 0 complexity | 10f48068c4549c691f531765c4ec3ff1 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, WTFPL
  1. %!target: html
  2. %!options: -H -o-
  3. %%%
  4. Sample output:
  9. On the output, there are *two* blank lines between the bars, and it should be only one. The extra line is added because both bars have their own blank lines before and after (respecting blanksaroundbar rule).
  10. It's _should_add_blank_line() mission to detect this situation and avoid printing the opening blank for the second bar, since the first bar already printed one on closing.
  11. It fails because the bar are nested, in this case, inside a quote block.
  12. _should_add_blank_line() doesn't play well with nested blocks. It
  13. _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 is empty. It should be "bar", but BLOCK.last only registers blocks closed at root level (BLOCK.level=1). As these are bars nested inside a quote block (level=2), BLOCK.last is empty until the quote block is closed (which occurs after the two bars are already put on target).
  14. The solution: 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 at the same neste level.
  15. This bug affects:
  16. test/crossing/bar.t2t
  17. test/crossing/bar2.t2t
  18. 2010-06-17
  19. %%%
  20. ----------------------------------------------
  21. ----------------------------------------------