The Syntax Highlighting Twiki Plugin is used to emphasize the rendering of your twiki text according to several languages.
It currently uses enscript
to render its output.
It supports the following languages :
To enable syntax highlighting on some text, just type :
some text belonging to the language
%end% where language is one of the list above, and numbered an optional keyword triggering the line numbering feature.
Notice that the %begin language%
and %end%
must be left alone on one single line.
The following text :
Syntax Highlighting: internal error
If you do not see a nice colorized piece of code above this, you should check if the plugin is well installed.
You can also output numbered lines starting at 10 with this text:
Syntax Highlighting: internal error
Plugin settings are stored as preferences variables. To reference
a plugin setting write %<plugin>_<setting>%
, i.e. %DEFAULTPLUGIN_SHORTDESCRIPTION%
data/debug.txt
)
SyntaxHighlighting.zip
package in your TWiki installation directory.
enscript
version supports the languages you add.)
%begin numbered sh% # youpi %end%
gives
Syntax Highlighting: internal error
Because enscript
strangely adds an extra line (for closing its emphasizing markers) between the matched <pre> </pre> to its html output.
Working around such a weird behavior is ... not planned.
MatchedWikiWord?
%end%
gives
Syntax Highlighting: internal error
Adding a newline at the end of input stops TWiki in his greedy matching, but this workaround is not an acceptable solution. Feel free to find another one ....
Plugin Author: | NicolasTisserand?, NicolasBurrus?, Perceval Anichini |
Plugin Version: | 12 Jul 2002 |
Change History: | 12 Jul 2002: Initial version |
CPAN Dependencies: | none |
Other Dependencies: | GNU enscript 1.6.3 |
Perl Version: | 5.0 |
Plugin Home: | http://www.lrde.epita.fr/cgi-bin/twiki/view/TWiki/SyntaxHighlightingPlugin |
Feedback: | NicolasTisserand? |
Related Topics: TWikiPreferences, TWikiPlugins, EmptyPlugin
-- NicolasTisserand? - 12 Jul 2002