Changes between Version 5 and Version 6 of Wiki Macros


Ignore:
Timestamp:
Jul 18, 2015, 12:43:07 PM (9 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Wiki Macros

    v5 v6  
    176176
    177177class HelloWorldMacro(WikiMacroBase):
    178         def expand_macro(self, formatter, name, text, args):
    179                 text = "whatever '''wiki''' markup you want, even containing other macros"
    180                 # Convert Wiki markup to HTML, new style
    181                 out = StringIO.StringIO()
    182                 Formatter(self.env, formatter.context).format(text, out)
    183                 return Markup(out.getvalue())
     178    def expand_macro(self, formatter, name, text, args):
     179        text = "whatever '''wiki''' markup you want, even containing other macros"
     180        # Convert Wiki markup to HTML, new style
     181        out = StringIO.StringIO()
     182        Formatter(self.env, formatter.context).format(text, out)
     183        return Markup(out.getvalue())
    184184}}}