Version 26 (modified by guest, 6 years ago)

--

generic viagra acyclovir zovirax levitra alternative generic viagra celexa buy xenical ambien online tramadol online phentermine viagra tramadol cod carisoprodol alprazolam herbal viagra generic viagra zyprexa buy cheap carisoprodol buy phentermine canada discount celexa discount phentermine online pharmacy tramadol generic viagra carisoprodol buying phentermine 37 5mg viagra alternative cheap propecia meridia effectiveness cheap tramadol viagra alternative online pharmacy tramadol zyprexa attorney buy online celexa online pharmacy tramadol what does alprazolam look like buy tadalafil cheap viagra phentermine online buy ambien buy levitra online zoloft side effects buy tadalafil buy hydrocodone online xanax viagra side effects of zyprexa xanax does meridia work phentermine 37 5mg buy online celexa viagra alternative cheap phentermine herbal viagra zyprexa diabetes buy alprazolam online buy viagra phentermine 37 5mg tramadol herbal viagra levitra cheap viagra buy ambien online acyclovir online viagra buy cheap xenical viagra cheap viagra generic viagra celexa phentermine online buy xanax herbal viagra cheap diazepam generic viagra herbal viagra viagra alternative viagra hydrocodone online phentermine 37 5mg buy cheap carisoprodol generic viagra diazepam alprazolam online side effects of xanax phentermine online buy xenical online buy xanax online buy hydrocodone online xanax xr soft tab tadalafil zyprexa attorney xanax xr buy hydrocodone online online pharmacy tramadol ambien side effects cheap levitra generic viagra soft tab tadalafil generic viagra generic viagra generic levitra herbal viagra phentermine generic viagra buy online celexa zoloft side effects cheap tramadol buy cheap diazepam zyprexa diabetes zyprexa diabetes cheap viagra buy viagra ambien online buy fioricet zyprexa diabetes acyclovir dosage buy tramadol acyclovir medication atenolol atenolol and flushing alprazolam pictures ambien online buy online xenical acyclovir side effects phentermine online buy atenolol buy phentermine buy viagra buy alprazolam online alprazolam pictures cheap viagra diazepam buy fioricet cheap diazepam hydrocodone atenolol medication celexa levitra alternative buy xanax zoloft buy carisoprodol side effects of xanax alprazolam online generic ambien levitra alternative cheap viagra getting alprazolam without a prescription buy phentermine discount phentermine cheap viagra celexa & discontinuation symptoms

Wiki Processors

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.

The wiki engine uses processors to allow using Restructured Text and raw HTML in any wiki text throughout Trac.

Using Processors

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.

Example 1 (inserting raw HTML in a wiki text):

{{{
#!html
<h1 style="color: orange">This is raw HTML</h1>
}}}

Results in:

This is raw HTML


Example 2 (inserting Restructured Text in wiki text):

{{{
#!rst
A header
--------
This is some **text** with a footnote [*]_.

.. [*] This is the footnote.
}}}

Results in:

A header
--------
This is some **text** with a footnote [*]_.

.. [*] This is the footnote.

Example 3 (inserting a block of C source code in wiki text):

{{{
#!c
int main(int argc, char *argv[])
{
  printf("Hello World\n");
  return 0;
}
}}}

Results in:

int main(int argc, char *argv[])
{
  printf("Hello World\n");
  return 0;
}

Available Processors

The following processors are included in the Trac distribution:

Code Highlighting Support

Trac includes processors to provide inline syntax highlighting for the following languages:

  • c -- C
  • cpp -- C++
  • python -- Python
  • perl -- Perl
  • ruby -- Ruby
  • php -- PHP
  • asp --- ASP
  • sql -- SQL
  • xml -- XML

Note: Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.

By using the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code. For example, you can write:

{{{
#!text/html
<h1>text</h1>
}}}

The result will be syntax highlighted HTML code. The same is valid for all other mime types supported.

For more processor macros developed and/or contributed by users, visit:

Advanced Topics: Developing Processor Macros

Developing processors is no different than WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.

Example: (Restructured Text Processor):

from docutils.core import publish_string

def execute(hdf, text, env):
    html = publish_string(text, writer_name = 'html')
    return html[html.find('<body>')+6:html.find('</body>')].strip()

See also: WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide