]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FSyntaxHighlighterPlugin
Set version to 1.5.1
[SourceForge/phpwiki.git] / pgsrc / Help%2FSyntaxHighlighterPlugin
1 Date: Thu,  2 Oct 2014 16:29:30 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.5.1)
3 Content-Type: application/x-phpwiki;
4   pagename=Help%2FSyntaxHighlighterPlugin;
5   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
6   charset=UTF-8
7 Content-Transfer-Encoding: binary
8
9 The **~SyntaxHighlighter** [[Help:WikiPlugin|plugin]] will highlight source
10 code in a variety of languages.
11
12 Highlighting is done in Javascript with [[http://highlightjs.org/]].
13
14 Recognized languages are the following:
15 | Apache      | Bash         | C#       | C++
16 | CSS         | CoffeeScript | Diff     | HTML, XML
17 | HTTP        | Ini          | JSON     | Java
18 | JavaScript  | Makefile     | Markdown | Nginx
19 | Objective C | PHP          | Perl     | Python
20 | Ruby        | SQL 
21
22 == Arguments ==
23
24 None.
25
26 The source code is put between {{{<<SyntaxHighlighter}}} and {{{>>}}}.
27
28 == Example ==
29
30 {{{
31 <<SyntaxHighlighter
32  #include <stdio.h>
33
34  int main() {
35      printf("Lalala\n");
36  }
37 >>
38 }}}
39
40 will give:
41
42 <<SyntaxHighlighter
43  #include <stdio.h>
44
45  int main() {
46      printf("Lalala\n");
47  }
48 >>
49
50 == History ==
51
52 The first implementation of this plugin passed all its arguments through a C++
53 highlighter called "highlight" (available at [[http://www.andre-simon.de]]).
54
55 This implementation allowed the following arguments, which are now ignored.
56
57 === Former Arguments ===
58
59 {| class="bordered"
60 |-
61 ! Argument
62 ! Description
63 ! Default value
64 |-
65 | **syntax**
66 |
67 | //None// (required argument), see http://www.andre-simon.de/doku/highlight/highlight.html
68 |-
69 | **style**
70 |
71 | ~[ "ansi", "gnu", "kr", "java", "linux" ~] (required)
72 |-
73 | **color**
74 |
75 | null (optional), see ##highlight/themes##
76 |-
77 | **number**
78 |
79 | 0  (optional)
80 |-
81 | **wrap**
82 |
83 | 0  (optional)
84 |}
85
86 == Authors ==
87
88 * alecthomas
89 * Fixes by [[Help:Reini Urban|Reini Urban]]
90 * Re-implementation with [[http://highlightjs.org/]] by Alain Peyrat and Marc-Etienne Vargenau, Alcatel-Lucent
91
92 <noinclude>
93 ----
94 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
95 </noinclude>