View Source:
Help/SyntaxHighlighterPlugin
Note:
This page has been locked and cannot be edited.
The **~SyntaxHighlighter** [[Help:WikiPlugin|plugin]] will highlight source code in a variety of languages. Highlighting is done in Javascript with [[http://highlightjs.org/]]. Recognized languages are the following: | Apache | Bash | C# | C++ | CSS | CoffeeScript | Diff | HTML, XML | HTTP | Ini | JSON | Java | JavaScript | Makefile | Markdown | Nginx | Objective C | PHP | Perl | Python | Ruby | SQL == Arguments == None. The source code is put between {{{<<SyntaxHighlighter}}} and {{{>>}}}. == Example == {{{ <<SyntaxHighlighter #include <stdio.h> int main() { printf("Lalala\n"); } >> }}} will give: <<SyntaxHighlighter #include <stdio.h> int main() { printf("Lalala\n"); } >> == History == The first implementation of this plugin passed all its arguments through a C++ highlighter called "highlight" (available at [[http://www.andre-simon.de]]). This implementation allowed the following arguments, which are now ignored. === Former Arguments === {| class="bordered" |- ! Argument ! Description ! Default value |- | **syntax** | | //None// (required argument), see http://www.andre-simon.de/doku/highlight/highlight.html |- | **style** | | ~[ "ansi", "gnu", "kr", "java", "linux" ~] (required) |- | **color** | | null (optional), see ##highlight/themes## |- | **number** | | 0 (optional) |- | **wrap** | | 0 (optional) |} == Authors == * alecthomas * Fixes by [[Help:Reini Urban|Reini Urban]] * Re-implementation with [[http://highlightjs.org/]] by Alain Peyrat and Marc-Etienne Vargenau, Alcatel-Lucent <noinclude> ---- [[PhpWikiDocumentation]] [[CategoryWikiPlugin]] </noinclude>
Please enable JavaScript to view the
comments powered by Disqus.
HollenbackDotNet
Home Page
Popular Pages
All Categories
Main Categories
General Interest
Geek Stuff
DevOps
Linux Stuff
Pictures
Search
Toolbox
RecentChanges
RecentNewPages
What links here
Printable version
AllPages
RecentChanges
Recent Changes Cached
HomePage
Favorite Categories
ActionPage
(150)
WikiPlugin
(149)
GeekStuff
(137)
PhpWikiAdministration
(102)
Help/PageList
(75)
Help/MagicPhpWikiURLs
(75)
Blog
(69)
Pictures
(60)
GeneralInterest
(44)
LinuxStuff
(38)
Views
View Page
View Source
History
Diff
Sign In