diff --git a/wiki-lenny/local/parser/Box.py b/wiki-lenny/local/parser/Box.py index b1f51f99..0941d3d2 100644 --- a/wiki-lenny/local/parser/Box.py +++ b/wiki-lenny/local/parser/Box.py @@ -1,6 +1,22 @@ # -*- coding: iso-8859-1 -*- """ - MoinMoin - Portail parser + .. + .... ............ ........ + . ....... . .... .. + . ... .. .. .. .. ..... . .. + .. .. ....@@@. .. . ........ . + .. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. .... + .@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... .... + @@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. .. + .@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. ..... + ...@@@.... @@@ .@@.......... ........ ..... .. + . ..@@@@.. . .@@@@. .. ....... . ............. + . .. .... .. .. . ... .... + . . .... ............. .. ... + .. .. ... ........ ... ... + ................................ + + MoinMoin - Box parser PURPOSE: une boite jolie @@ -13,13 +29,13 @@ tables, images.... }}} + Copyright 2008 Antoine Durand-Gasselin + """ -from MoinMoin import config, wikiutil -from MoinMoin.macro import Macro -from MoinMoin.parser.text_creole import Emitter -from MoinMoin.parser._creole import Parser as CreoleParser import os,string,re,StringIO +from MoinMoin import config, wikiutil +from MoinMoin.parser.text_moin_wiki import Parser as WikiParser Dependencies = [] color_list = ['orange', 'black', 'red', 'green', 'blue', 'gray'] @@ -65,12 +81,14 @@ class Parser: try: color = self.settings['color'] except: color=None - # On crée l'arbre de syntaxe - content_tree = CreoleParser(self.raw).parse() + content_buf = StringIO.StringIO() + self.request.redirect(content_buf) + WikiParser(self.raw, self.request).format(formatter) + content = content_buf.getvalue() + self.request.redirect() - # On le formatte - fmt_content = Emitter(content_tree, formatter, self.request, Macro(self)).emit() + del content_buf # On le fout dans une boîte - self.request.write(formatter.crans_box(title, fmt_content, color)) + self.request.write(formatter.crans_box(title, content, color))