]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FSyntaxHighlighterPlugin
Initialize $html
[SourceForge/phpwiki.git] / pgsrc / Help%2FSyntaxHighlighterPlugin
1 Date: Fri,  7 Dec 2012 14:58:45 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0)
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]] passes all its arguments through a C++
10 highlighter called "highlight" (available at [[http://www.andre-simon.de]]).
11
12 == Arguments ==
13
14 {| class="bordered"
15 |-
16 ! Argument
17 ! Description
18 ! Default value
19 |-
20 | **syntax**
21 |
22 | //None// (required argument), see http://www.andre-simon.de/doku/highlight/highlight.html
23 |-
24 | **style**
25 |
26 | ~[ "ansi", "gnu", "kr", "java", "linux" ~] (required)
27 |-
28 | **color**
29 |
30 | null (optional), see ##highlight/themes##
31 |-
32 | **number**
33 |
34 | 0  (optional)
35 |-
36 | **wrap**
37 |
38 | 0  (optional)
39 |}
40
41 == Example ==
42
43 {{{
44 <<SyntaxHighlighter syntax=c style=kr color=bright
45  #include <stdio.h>
46
47  int main() {
48  printf("Lalala\n");
49  }
50 >>
51 }}}
52
53 will give:
54
55 <<SyntaxHighlighter syntax=c style=kr color=bright
56  #include <stdio.h>
57
58  int main() {
59  printf("Lalala\n");
60  }
61 >>
62
63 I did not use beautifier, because it used up more than 8M of memory on
64 my system and PHP killed it. I'm not sure whether this is a problem
65 with my integration, or with beautifier itself.
66
67 == Authors ==
68
69 * alecthomas
70 * Fixes by [[Help:Reini Urban|Reini Urban]]:
71 ** support options: syntax, style, color,
72 ** php version switch,
73 ** HIGHLIGHT_DATA_DIR, HIGHLIGHT_EXE constants,
74
75 <noinclude>
76 ----
77 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
78 </noinclude>