Menu

Commit [r4621]  Maximize  Restore  History

IWikiMacroProvider API change.

Well, it's actually about reverting the API change done in r4451 (after the introduction of WikiContext). There, the `render_macro` took a `formatter` first argument instead of a `req`. That's way more flexible, but was not well received, as it breaks compatibility with all the existing new-style macros (see #4568).

So the calling conventions for `render_macro` have been restored and a new method has been introduced for the plugins that want to take benefit from the 0.11 features (see #4139).

The relevant part of the API is:
{{{
#!python
class IWikiMacroProvider(Interface):
"""Extension point interface for components that provide Wiki macros."""

...

def render_macro(req, name, content):
"""Return the HTML output of the macro (deprecated)"""

def expand_macro(formatter, name, content):
"""Called by the formatter when rendering the parsed wiki text.

(since 0.11)
"""
}}}

cboos 2007-01-24

changed /trunk/trac/admin/console.py
changed /trunk/trac/wiki/api.py
changed /trunk/trac/wiki/formatter.py
changed /trunk/trac/wiki/intertrac.py
changed /trunk/trac/wiki/interwiki.py
changed /trunk/trac/wiki/macros.py
changed /trunk/trac/wiki/tests/formatter.py
/trunk/trac/admin/console.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/api.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/formatter.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/intertrac.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/interwiki.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/macros.py Diff Switch to side-by-side view
Loading...
/trunk/trac/wiki/tests/formatter.py Diff Switch to side-by-side view
Loading...
Auth0 Logo