changeset 5289:e0e6cd609789

HighlighterList macro: use more readable display, docstring changes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 16 Nov 2009 10:13:35 +0100
parents c97e004300ac
children 8d2629718603
files MoinMoin/macro/HighlighterList.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/HighlighterList.py	Mon Nov 16 09:30:16 2009 +0100
+++ b/MoinMoin/macro/HighlighterList.py	Mon Nov 16 10:13:35 2009 +0100
@@ -1,7 +1,7 @@
 """
-    HighlighterList Macro
+    MoinMoin - HighlighterList Macro
 
-    MoinMoin - A simple macro for displaying a table with list of available Pygments lexers.
+    A simple macro for displaying a table with list of available Pygments lexers.
 
     Usage: <<HighlighterList([columns=<list of one of description, names,
              patterns, mimetypes, separated by pipe>,
@@ -108,7 +108,10 @@
         ret.append(f.table_row(1))
 
         for col in columns:
-            ret.extend([f.table_cell(1), f.text(parser[col]), f.table_cell(0)])
+            text = parser[col]
+            if isinstance(text, (tuple, list)):
+                text = ', '.join(text)
+            ret.extend([f.table_cell(1), f.text(text), f.table_cell(0)])
 
         ret.append(f.table_row(0))