| 23 | |
| 24 | == Interface Changes == |
| 25 | |
| 26 | === `IWikiMacroProvider` ^[source:trunk/trac/wiki/api.py@head#L73 (0.11)] [source:tags/trac-0.10/trac/wiki/api.py@head#L70 (0.10)]^ === #IWikiMacroProvider |
| 27 | |
| 28 | `render_macro(req, name, content)` is now `render_macro(formatter, name, content)`. |
| 29 | |
| 30 | The `req` was not enough for most of the macros, which needed to resort to various hacks to get more information about the formatting at work. The more adequate `formatter` object is now provided instead. The `req` object can still be obtained from the formatter, with `formatter.req`. Better yet, the formatter now always know about the WikiContext in which it operates (use `formatter.context` to retrieve it). |
| 31 | The context object provides the information about the Trac resource which "owns" the text being processed. |
| 32 | |
| 33 | |
| 34 | === `IHTMLPreviewRenderer` ^[source:trunk/trac/wiki/api.py@head#L213 (0.11)] [source:tags/trac-0.10/trac/wiki/api.py@head#L209 (0.10)]^ === #IHTMLPreviewRenderer |
| 35 | |
| 36 | Similar to the above change, `render(req, mimetype ...)` is now `render(context, mimetype ...)`. It doesn't matter that much however, as it looks like that this interface is going to be integrated in `IContentConverter` anyway (see #3332). |