[source code]
}}"); define("PLUGIN_GCODE_STYLE", "pre.prettyprint { padding-top: 2em; padding-bottom: 2em; }"); // 左寄せ等 define("PLUGIN_GCODE_ALL_LN_STYLE", "pre.prettyprint ol.linenums > li {list-style-type: decimal; }"); // すべての行に番号をつける function plugin_gcode_init() { global $head_tags; $head_tags[] = ""; $head_tags[] = ""; if (PLUGIN_GCODE_ALL_LINENUMS) $head_tags[] = ""; } function plugin_gcode_convert() { $num = func_num_args(); if ($num < 1) return PLUGIN_GCODE_USAGE; $args = func_get_args(); $code = ''; $lang = ''; $classAttr = 'prettyprint'; if ($num > 1) { $lang = htmlsc(strtolower($args[0])); $code = htmlsc($args[$num - 1]); } else { $code = htmlsc($args[0]); } $classAttr .= ' lang-' . $lang; if (PLUGIN_GCODE_LINENUMS == true) $classAttr .= ' linenums'; return "
" . $code . "
"; }