Changes between Version 1 and Version 2 of WikiProcessors
- Timestamp:
- 11/18/04 18:03:00 (20 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiProcessors
v1 v2 81 81 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml. 82 82 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText. 83 * '''textile''' -- Initial support as of aug 2, 2004. See [http://projects.edgewall.com/trac/ticket/593 ticket 593] and [http://dealmeida.net/projects/textile/ Textile]. 83 84 84 85 === Source Code Support === … … 95 96 '''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.'' 96 97 98 By using the mime-type as processor, it is posible to syntax-highlight the same languages that are supported when browsing source code. (The list of mime-types can be found in [source:trunk/trac/Mimeview.py Mimeview.py]). 97 99 98 For more processor macros developed and/or contributed by users, visit the processor bazaar: 99 http://projects.edgewall.com/trac/wiki/ProcessorBazaar 100 For example, you can write: 101 102 {{{ 103 {{{ 104 #!text/html 105 <h1>text</h1> 106 }}} 107 }}} 108 109 The result will be syntax highlighted html code. The same is valid for all other mime types supported. 110 111 112 113 For more processor macros developed and/or contributed by users, visit the macro bazaar: 114 http://projects.edgewall.com/trac/wiki/MacroBazaar 100 115 101 116 ---- … … 107 122 from docutils.core import publish_string 108 123 109 def execute(hdf, text ):124 def execute(hdf, text, env): 110 125 html = publish_string(text, writer_name = 'html') 111 126 return html[html.find('<body>')+6:html.find('</body>')].strip() … … 113 128 114 129 ---- 115 See also : WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide130 See also : WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide