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