[[PageOutline(2-5,Contents,pullout)]] = Code Wiki Processor == Description This plugin provides a [wiki:WikiProcessors wiki processor] for code listing that uses file extensions for language detection rather than mimetypes. Normally you would - for [wiki:WikiProcessors#CodeHighlightingSupport more "exotic"] programming languages - have to specify the mimetype for a codelisting, like this: {{{ {{{ #!text/css div.lang-name-template { margin: -1em 1.75em 1em 1.75em; background: #F7F7F7; text-align: right; padding-right: 0.5em; border-style: solid; border-color: #D7D7D7; border-width: 0 1px 1px 1px; } }}} }}} Since mimetypes are often hard to remember (is it `text/...` or `application/...`?) and you have to dig to find the actual mimetype of a certain programming language this wiki processor addresses this problem. You only have to specify the ''file extension'' of the programming language. To specify to code block above using this plugin simply write: {{{ {{{ #!code(lang=css) div.lang-name-template { margin: -1em 1.75em 1em 1.75em; background: #F7F7F7; text-align: right; padding-right: 0.5em; border-style: solid; border-color: #D7D7D7; border-width: 0 1px 1px 1px; } }}} }}} This results in: [[Image(screenshot.png)]] '''Note:''' Some "programming languages" (such as Apache config files) may be supported by the installed syntax highlighting tools, such as [https://pygments.org/ Pygments] (BSD licensed), but not be supported by Trac. This plugin adds support for those less frequently used languages. As a bonus the programming language is displayed in the lower right corner of the listing. This way a reader can easily identify the language the listing is written in. == Bugs/Feature Requests Existing bugs and feature requests for TracCodeProcessorMacro are [report:9?COMPONENT=TracCodeProcessorMacro here]. If you have any issues, create a [/newticket?component=TracCodeProcessorMacro new ticket]. [[TicketQuery(component=TracCodeProcessorMacro&group=type,format=progress)]] == Download Download the zipped source from [export:traccodeprocessormacro here]. == Source You can check out TracCodeProcessorMacro from [/svn/traccodeprocessormacro here] using Subversion, or [source:traccodeprocessormacro browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Recent Changes [[ChangeLog(traccodeprocessormacro, 3)]] == Author/Contributors '''Author:''' [wiki:manski Sebastian Krysmanski] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''