====== header selector ======
===== 入手元 =====
[[http://wa.otesei.com/item/535|dokuwiki 見出しにセレクタを指定するプラグイン - wa - NucleusやFlashなどなど]]
===== ソース修正 =====
そのままではなんか正常に表示されなかったけどデバッグしてみた結果一部修正して解決。
~略~
/**
* to render the content
* replace the contents which were already output
* @param $format Format specified in the renderer
* @param $renderer reference renderer
* @param $data value returned by handler
*
*
*
* Even the same title at the same level, it is unique
*/
public function render($format, &$renderer, $data)
{
if ($format == 'xhtml' && $data)
{
$rows = explode("\n", $renderer->doc);
$target = $rows[count($rows) - 5];
//preg_match('|^()(.+?)()$|', $target, $matches);
preg_match('|^()(.+?)()$|', $target, $matches);
$renderer->doc = strtr($renderer->doc, array($target => $matches[1].$data.$matches[2].$matches[3].$matches[4]));
return true;
}
return false;
}
~略~
preg_match()の正規表現を修正。\\
テンプレがarcticだからなのかな?
**2013/4/16**\\
なんかまたダメになってたので再修正。\\
てか配布元消えちゃってるな。
{{tag>DokuWiki プラグイン}}