2012-02-20 | Paul Boddie | file changeset files shortlog | Attempted to make the formatting of plain text work in Moin 1.9 without breaking support for Moin 1.8 or support for formatting HTML. Moin 1.9 appears to use a modified API and fails to invoke the appropriate flushing mechanism in the plain text formatter. |
paul@1 | 1 | #!/usr/bin/env python |
paul@1 | 2 | |
paul@1 | 3 | from ImprovedTableParser import replaceMarkers |
paul@1 | 4 | |
paul@1 | 5 | text = """ |
paul@1 | 6 | {{{ |
paul@1 | 7 | Hello |
paul@1 | 8 | \\{\\{\\{ |
paul@1 | 9 | Hello again |
paul@1 | 10 | But not \\{\\{\\{ this \\}\\}\\} |
paul@1 | 11 | \\\\{\\\\{\\\\{ |
paul@1 | 12 | And once again |
paul@1 | 13 | \\\\}\\\\}\\\\} |
paul@1 | 14 | And again |
paul@1 | 15 | \\}\\}\\} |
paul@1 | 16 | again |
paul@1 | 17 | }}} |
paul@1 | 18 | """ |
paul@1 | 19 | |
paul@1 | 20 | replaced = replaceMarkers(text) |
paul@1 | 21 | |
paul@1 | 22 | print text |
paul@1 | 23 | print |
paul@1 | 24 | print replaced |
paul@1 | 25 | |
paul@1 | 26 | # vim: tabstop=4 expandtab shiftwidth=4 |