PukiWiki - <h5><h6>タグを使用可能にする
PukiWikiで<h4>までは***で使用することができるが、<h5>、<h6>まで使用可能にする為、下記のプログラムを変更する。
[ lib/convert_html.php ]
240行目辺り
・変更前
$this->level = min(3, strspn($text, '*'));
・変更後
$this->level = min(5, strspn($text, '*'));
[ lib/html.php ]
366行目辺り
・変更前
if (preg_match('/^(\*{0,3})(.*?)\[#([A-Za-z][\w-]+)\](.*?)$/m', $str, $matches)) {
・変更後
if (preg_match('/^(\*{0,5})(.*?)\[#([A-Za-z][\w-]+)\](.*?)$/m', $str, $matches)) {
388行目辺り
・変更前
$str = preg_replace('/^\*{0,3}/', '', $str);
・変更後
$str = preg_replace('/^\*{0,5}/', '', $str);
これで<h5><h6>も使用可能!!
| 固定リンク

最近のコメント