Changes between Version 2 and Version 3 of WikiProcessors


Ignore:
Timestamp:
12/02/07 11:40:15 (13 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiProcessors

    v2 v3  
    11= Wiki Processors = 
    2 Processors are WikiMacros designed to provide alternative markup formats for the Trac Wiki engine. Processors can be thought of as ''macro functions to process user-edited text''.  
    32 
    4 The wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text] and [wiki:WikiHtml raw HTML] in any wiki text throughout Trac. 
     3Processors are WikiMacros designed to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''macro functions to process user-edited text''.  
     4 
     5The Wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text], [wiki:WikiHtml raw HTML] and [http://www.textism.com/tools/textile/ textile] in any Wiki text throughout Trac. 
     6 
    57 
    68== Using Processors == 
    7 To use a processor on a block of text, use a wiki blockquote, selecting a processor by name using ''shebang notation'' (#!), familiar to most UNIX users from scripts. 
     9 
     10To use a processor on a block of text, use a Wiki code block, selecting a processor by name using ''shebang notation'' (#!), familiar to most UNIX users from scripts. 
    811 
    912'''Example 1''' (''inserting raw HTML in a wiki text''): 
     
    7578---- 
    7679 
    77 '''Example 4''' (''inserting a block of Python source code in wiki text (added by domlowe)''): 
    78  
    79 {{{ 
    80 #!html 
    81 <pre class="wiki">{{{ 
    82 #!python 
    83 import bananas 
    84 print 'Bananas are imported' 
    85 try: 
    86   import pineapples 
    87   print 'Pineapples are imported too' 
    88 except: 
    89   print 'Fruit overload' 
    90  
    91 def main(): 
    92    #etc etc 
    93    pass  
    94 }}}</pre> 
    95 }}} 
    96  
    97 '''Results in:''' 
    98 {{{ 
    99 #!python 
    100 import bananas 
    101 print 'Bananas are imported' 
    102 try: 
    103   import pineapples 
    104   print 'Pineapples are imported too' 
    105 except: 
    106   print 'Fruit overload' 
    107  
    108 def main(): 
    109    #etc etc 
    110    pass  
    111 }}} 
    112  
    113 ---- 
    114  
    11580== Available Processors == 
    11681The following processors are included in the Trac distribution: 
    11782 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml. 
    11883 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText. 
    119  * '''textile''' -- Supported if  [http://dealmeida.net/projects/textile/ Textile] is installed. 
     84 * '''textile''' -- Supported if  [http://dealmeida.net/projects/textile/ Textile] is installed. See [http://hobix.com/textile/ a Textile reference]. 
     85 
     86Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example. 
    12087 
    12188=== Code Highlighting Support === 
     
    149116 
    150117== Advanced Topics: Developing Processor Macros == 
    151 Developing processors is no different than WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. 
     118Developing processors is no different from WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. 
    152119 
    153120'''Example:''' (''Restructured Text Processor''): 
    154121{{{ 
     122#!python 
    155123from docutils.core import publish_string 
    156124