Changes between Version 49 and Version 50 of WikiProcessors
- Timestamp:
- May 6, 2011, 12:13:37 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiProcessors
v49 v50 174 174 ||||= '''Code Highlighting Support''' =|| 175 175 || '''`#!c`''' [[BR]] '''`#!cpp`''' (C++) [[BR]] '''`#!python`''' [[BR]] '''`#!perl`''' [[BR]] '''`#!ruby`''' [[BR]] '''`#!php`''' [[BR]] '''`#!asp`''' [[BR]] '''`#!java`''' [[BR]] '''`#!js`''' (Javascript) [[BR]] '''`#!sql`''' [[BR]] '''`#!xml`''' (XML or HTML) [[BR]] '''`#!sh`'''_(!Bourne/Bash_shell) [[BR]] '''etc.''' [[BR]] || Trac includes processors to provide inline syntax highlighting for source code in various languages. [[BR]] [[BR]] Trac relies on external software packages for syntax coloring, like [http://pygments.org Pygments]. [[BR]] [[BR]] See TracSyntaxColoring for information about which languages are supported and how to enable support for more languages. || 176 177 Note also that 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: 178 {{{ 176 |||| || 177 ||||= '''MIME Type Processors''' =|| 178 |||| Using the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code. || 179 {{{#!td 180 For example: 181 {{{ 179 182 {{{ 180 183 #!text/html 181 184 <h1>text</h1> 182 185 }}} 183 }}} 184 186 }}} 187 }}} 188 {{{#!td 185 189 The result will be syntax highlighted HTML code: 186 {{{190 {{{ 187 191 #!text/html 188 192 <h1>text</h1> 189 }}}193 }}} 190 194 191 195 The same is valid for all other [TracSyntaxColoring#SyntaxColoringSupport mime types supported]. 192 196 }}} 193 197 194 198 For more processor macros developed and/or contributed by users, visit: