2012-02-23 | Paul Boddie | file changeset files shortlog | Added support for column and row spans so that the contents of a table can still be sorted through the definition of a uniform grid of cells whose contents can then be compared on a row-by-row basis. Fixed sort direction labelling in the sort controls. Tidied up the sorting logic, adding support for sorting where only the headers and name attributes have been defined for a table. |
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 |