changeset 5290:8d2629718603

macro/HighlighterList.py: some output prettifying.
author Eugene Syromyatnikov <evgsyr@gmail.com>
date Mon, 16 Nov 2009 12:24:46 +0300
parents e0e6cd609789
children 14575ba5aeef
files MoinMoin/macro/HighlighterList.py
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/HighlighterList.py	Mon Nov 16 10:13:35 2009 +0100
+++ b/MoinMoin/macro/HighlighterList.py	Mon Nov 16 12:24:46 2009 +0300
@@ -108,10 +108,17 @@
         ret.append(f.table_row(1))
 
         for col in columns:
-            text = parser[col]
-            if isinstance(text, (tuple, list)):
-                text = ', '.join(text)
-            ret.extend([f.table_cell(1), f.text(text), f.table_cell(0)])
+            if col:
+                ret.extend([
+                            f.table_cell(1),
+                            f.code(1),
+                            isinstance(parser[col], str) and f.text(parser[col])
+                              or (f.code(0) + ', ' + f.code(1)).join([f.text(i) for i in parser[col]]),
+                            f.code(0),
+                            f.table_cell(0),
+                          ])
+            else:
+                ret.extend([f.table_cell(1), f.text(parser[col]), f.table_cell(0)])
 
         ret.append(f.table_row(0))