使い方
準備
まず dp.SyntaxHighlighter
をダウンロード、解凍し、skin ディレクトリに dp.SyntaxHighlighter という名前のフォルダで置いてください。
プラグインで複数行引数を使えるようにしておきます。PukiWiki を 1.4.6 以上にアップデート。pukiwiki.ini.php
-define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled
+define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 0); // 1 = Disabled
対応言語
| 対応言語 | 呼び出し名 |
| C++ | cpp, c, c++ |
| C# | c#, c-sharp, csharp |
| CSS | css |
| Delphi | delphi, pascal |
| Java | java |
| Java Script | js, jscript, javascript |
| PHP | php |
| Python | py, python |
| Ruby | rb, ruby, rails, ror |
| Sql | sql |
| VB | vb, vb.net |
| XML/HTML | xml, html, xhtml, xslt |
Extended configurations
| nogutter | Will display no gutter. |
| nocontrols | Will display no controls at the top. |
| collapse | Will collapse the block by default. |
| firstline[value] | Will begin line count at value. Default value is 1. |
| showcolumns | Will show row columns in the first line. |
Example
#highlight(php){{
<?php
echo "hoge";
?>
}}
#highlight(php:nogutter){{
<?php
echo "hoge";
?>
}}
#highlight(php:nogutter:nocontrols){{
<?php
echo "hoge";
?>
}}
#highlight(php:collapse){{
<?php
echo "hoge";
?>
}}
#highlight(php:firstline[3]){{
<?php
echo "hoge";
?>
}}
#highlight(end)
Last, call an option end to call javascript of dp.SyntaxHighliter. I had no other way because of specification of pukiwiki and dp.SyntaxHighlighter.


