Changes between Version 2 and Version 3 of WikiMacros


Ignore:
Timestamp:
Apr 16, 2016, 7:07:22 PM (9 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiMacros

    v2 v3  
    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}}}