##// END OF EJS Templates
minirst: drop debug code...
Matt Mackall -
r15038:3f4d337c default
parent child Browse files
Show More
@@ -18,7 +18,7 b' Remember to update http://mercurial.sele'
18 when adding support for new constructs.
18 when adding support for new constructs.
19 """
19 """
20
20
21 import re, sys
21 import re
22 import util, encoding
22 import util, encoding
23 from i18n import _
23 from i18n import _
24
24
@@ -553,27 +553,3 b' def decorateblocks(blocks, width):'
553 text = formatblocks(s[2], width)
553 text = formatblocks(s[2], width)
554 lines.append([(section, l) for l in text.splitlines(True)])
554 lines.append([(section, l) for l in text.splitlines(True)])
555 return lines
555 return lines
556
557 if __name__ == "__main__":
558 from pprint import pprint
559
560 def debug(func, *args):
561 blocks = func(*args)
562 print "*** after %s:" % func.__name__
563 pprint(blocks)
564 print
565 return blocks
566
567 text = sys.stdin.read()
568 blocks = debug(findblocks, text)
569 blocks = debug(findliteralblocks, blocks)
570 blocks, pruned = debug(prunecontainers, blocks, sys.argv[1:])
571 blocks = debug(inlineliterals, blocks)
572 blocks = debug(splitparagraphs, blocks)
573 blocks = debug(updatefieldlists, blocks)
574 blocks = debug(updateoptionlists, blocks)
575 blocks = debug(findsections, blocks)
576 blocks = debug(addmargins, blocks)
577 blocks = debug(prunecomments, blocks)
578 blocks = debug(findadmonitions, blocks)
579 print '\n'.join(formatblock(b, 30) for b in blocks)
General Comments 0
You need to be logged in to leave comments. Login now