v1.1

設定

まず dp.SyntaxHighlighter v.1.3.0 をダウンロードし、skin ディレクトリに SyntaxHighlighter という名前のフォルダで置いてください。

プラグインで複数行引数を使えるようにしておきます。pukiwiki.ini.php

-define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled
+define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 0); // 1 = Disabled

How to use

I assume you are enabling multiline plugin arguments. Please update Pukiwiki over 1.4.6.

Supported languages

  • csharp
  • delphi
  • javascript
  • php
  • python
  • sql
  • vb
  • xml

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.

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.