Attachment 'macro_init_.diff'

Download

   1 --- __init__old.py	2007-02-19 14:06:16.000000000 +0100
   2 +++ __init__.py	2007-02-19 14:55:34.000000000 +0100
   3 @@ -121,12 +121,20 @@
   4          
   5              Language macro are used in two ways:
   6               * [lang] - set the current language until next lang macro
   7 -             * [lang(text)] - insert text with specific lang inside page
   8 +             * [lang(text)] - insert wikimarkup with specific lang inside page
   9          """
  10          if text:
  11 -            return (self.formatter.lang(1, self.name) +
  12 -                    self.formatter.text(text) +
  13 -                    self.formatter.lang(0, self.name))
  14 +            # Code taken from fabelous MiniPage macro by ReimarBauer
  15 +            from MoinMoin.parser import text_moin_wiki as wiki
  16 +            import string, StringIO
  17 +            out=StringIO.StringIO()
  18 +            self.request.redirect(out)
  19 +            wikiizer = wiki.Parser(text, self.request)
  20 +            wikiizer.format(self.formatter)
  21 +            result=out.getvalue()
  22 +            self.request.redirect()
  23 +            del out
  24 +            return result
  25  
  26          self.request.current_lang = self.name
  27          return ''

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-02-19 14:16:25, 1.1 KB) [[attachment:macro_init_.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.