File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,3 +62,10 @@ def test_blockcode_in_README():
6262 with open ('tests/fixtures/README.txt' ) as f :
6363 expect = '' .join (f .readlines ())
6464 assert result == expect
65+
66+ def test_blockcode_comment ():
67+ input = '###.. block comment\n another line\n \n p. New line'
68+ expect = '\t <p>New line</p>'
69+ t = textile .Textile ()
70+ result = t .parse (input )
71+ assert result == expect
Original file line number Diff line number Diff line change @@ -465,7 +465,7 @@ def block(self, text):
465465 else :
466466 # if we're inside an extended block, add the text from the
467467 # previous extension to the front
468- if ext :
468+ if ext and out :
469469 line = '{0}\n \n {1}' .format (out .pop (), line )
470470 whitespace = ' \t \n \r \f \v '
471471 if ext or not line [0 ] in whitespace :
@@ -494,7 +494,7 @@ def block(self, text):
494494 cite = ''
495495 graf = ''
496496
497- if ext :
497+ if ext and out :
498498 out .append (generate_tag (block .outer_tag , out .pop (),
499499 block .outer_atts ))
500500 return '\n \n ' .join (out )
You can’t perform that action at this time.
0 commit comments