Diff: Help/SyntaxHighlighterPlugin

Differences between version 4 and predecessor to the previous major change of Help/SyntaxHighlighterPlugin.

Other diffs: Previous Revision, Previous Author

Newer page: version 4 Last edited on February 23, 2012 2:52 pm by PhilHollenback Revert
Older page: version 3 Last edited on February 23, 2012 2:52 pm by PhilHollenback Revert

Content of versions 3 and 4 is identical.

Version 4 was created because:


version 4

The SyntaxHighlighter plugin passes all its arguments through a C++ highlighter called "highlight" (available at http://www.andre-simon.de/).

Arguments

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)

Example

<<SyntaxHighlighter syntax=c style=kr color=emacs
 #include <stdio.h>

 int main() {
 printf("Lalala\n");
 }
>>

will give:


#include <stdio.h>

 int main() {
 printf("Lalala\n");
 }

I did not use beautifier, because it used up more than 8M of memory on my system and PHP killed it. I'm not sure whether this is a problem with my integration, or with beautifier itself.

Authors

  • alecthomas
  • Fixes by Reini Urban:

    • support options: syntax, style, color,
    • php version switch,
    • HIGHLIGHT_DATA_DIR, HIGHLIGHT_EXE constants,


Our Founder
ToolboxClick to hide/show