Code

Changes between Version 1 and Version 2 of WikiProcessors


Ignore:
Timestamp:
08/02/05 10:07:44 (9 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiProcessors

    v1 v2  
    8181 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml. 
    8282 * '''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]. 
    8384 
    8485=== Source Code Support === 
     
    9596'''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.'' 
    9697 
     98By 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]). 
    9799 
    98 For more processor macros developed and/or contributed by users, visit the processor bazaar:  
    99  http://projects.edgewall.com/trac/wiki/ProcessorBazaar 
     100For example, you can write: 
     101 
     102{{{ 
     103{{{ 
     104#!text/html 
     105<h1>text</h1> 
     106}}} 
     107}}} 
     108 
     109The result will be syntax highlighted html code. The same is valid for all other mime types supported. 
     110 
     111 
     112 
     113For more processor macros developed and/or contributed by users, visit the macro bazaar:  
     114 http://projects.edgewall.com/trac/wiki/MacroBazaar 
    100115 
    101116---- 
     
    107122from docutils.core import publish_string 
    108123 
    109 def execute(hdf, text): 
     124def execute(hdf, text, env): 
    110125    html = publish_string(text, writer_name = 'html') 
    111126    return html[html.find('<body>')+6:html.find('</body>')].strip() 
     
    113128 
    114129---- 
    115 See also: WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide 
     130See also : WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide