| 50 | |
| 51 | ---- |
| 52 | == Advanced Topics: Developing Processor Macros == |
| 53 | Developing processors is no different than WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. |
| 54 | |
| 55 | '''Example:''' (''Restructured Text Processor''): |
| 56 | {{{ |
| 57 | from docutils.core import publish_string |
| 58 | |
| 59 | def execute(hdf, text): |
| 60 | html = publish_string(text, writer_name = 'html') |
| 61 | return html[html.find('<body>')+6:html.find('</body>')].strip() |
| 62 | }}} |
| 63 | |
| 64 | ---- |
| 65 | See also: WikiMacros, WikiFormatting, TracGuide |