]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FSyntaxHighlighterPlugin
Wikicreole syntax for headers
[SourceForge/phpwiki.git] / pgsrc / Help%2FSyntaxHighlighterPlugin
1 Date: Sat, 24 Jan 2009 19:18:24 +0100
2 Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
3 X-Rcs-Id: $Id$
4 Content-Type: application/x-phpwiki;
5   pagename=Help%2FSyntaxHighlighterPlugin;
6   flags=PAGE_LOCKED;
7   markup=2;
8   charset=iso-8859-1
9 Content-Transfer-Encoding: binary
10
11 The *~SyntaxHighlighter* [plugin|Help:WikiPlugin] passes all its arguments through a C++
12 highlighter called "highlight" (available at http://www.andre-simon.de/).
13
14 == Arguments
15 syntax |
16   (required), See http://www.andre-simon.de/doku/highlight/highlight.html 
17 style |
18   ~[ "ansi", "gnu", "kr", "java", "linux" ~] (required)
19 color |
20   null (optional), see =highlight/themes=
21 number |
22   0  (optional)
23 wrap |
24   0  (optional)
25
26 == Example
27
28 <verbatim>
29 <?plugin SyntaxHighlighter syntax=c style=kr color=emacs
30  #include <stdio.h>
31
32  int main() {
33  printf("Lalala\n");
34  }
35 ?>
36 </verbatim>
37
38 =>
39
40 <?plugin SyntaxHighlighter syntax=c style=kr color=emacs
41  #include <stdio.h>
42
43  int main() {
44  printf("Lalala\n");
45  }
46 ?>
47
48 I did not use beautifier, because it used up more than 8M of memory on
49 my system and PHP killed it. I'm not sure whether this is a problem
50 with my integration, or with beautifier itself.
51
52 == Author 
53
54 alecthomas
55
56 Fixes by [Reini Urban|PhpWiki:ReiniUrban]:
57 * support options: syntax, style, color.
58 * php version switch
59 * HIGHLIGHT_DATA_DIR, HIGHLIGHT_EXE constants
60
61 ----
62 [PhpWikiDocumentation] [CategoryWikiPlugin]