2012-07-13 | Paul Boddie | raw annotate files changeset graph | Consume space after row markers, avoiding indentation for text on the same line. |
1 #!/usr/bin/env python 2 3 from ImprovedTableParser import patterns 4 5 text = """ 6 {{{{{ 7 Hello 8 {{{{ 9 Hello again 10 And also {{{ this }}} 11 {{{ 12 And once again 13 }}} 14 And again 15 }}}} 16 again 17 }}}} 18 """ 19 20 matches = patterns["markers"].split(text) 21 expected = 17 22 23 print text 24 print 25 print matches 26 print 27 print len(matches) == expected, ": length is", len(matches), "==", expected 28 29 # vim: tabstop=4 expandtab shiftwidth=4