I've added colspan wiki syntax like this :
||||||3 colimns span||
||||2 cols span||---||
|| -1- || -2- || -3- ||
if it is ok I'd like to add more moin-style syntax. Whatche think?
Patch:
Index: C:/work/workspace/trac/wiki/formatter.py
===================================================================
--- C:/work/workspace/trac/wiki/formatter.py (revision 3710)
+++ C:/work/workspace/trac/wiki/formatter.py (working copy)
@@ -221,6 +221,7 @@
r"(?P<indent>^(?P<idepth>\s+)(?=\S))",
# || table ||
r"(?P<last_table_cell>\|\|\s*$)",
+ r"(?P<table_cell_colspan>\|\|\|+)",
r"(?P<table_cell>\|\|)"]
_processor_re = re.compile('#\!([\w+-][\w+-/]*)')
@@ -668,6 +669,17 @@
else:
self.in_table_cell = 1
return '<td>'
+
+ def _table_cell_colspan_formatter(self, match, fullmatch):
+ self.open_table()
+ self.open_table_row()
+ tdspan = '<td colspan=%d>' % (len(match)/2)
+ if self.in_table_cell:
+ return '</td>'+tdspan
+ else:
+ self.in_table_cell = 1
+ return tdspan
+
def open_table(self):
if not self.in_table:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/trac-dev
-~----------~----~----~----~------~----~------~--~---