switch($state) { case DOKU_LEXER_ENTER : $match = str_replace(':','_',substr($match,2,-1)); return array($state, $match); case DOKU_LEXER_UNMATCHED : if(preg_match("/<top>([\w\:]+)\<\/top\>/m",$match,$matches)) { $id = $matches[1]; $text = io_readWikiPage(wikiFN($id, $rev), $id, false); if($text) { $match = preg_replace("/<top>.*?<\/top>/ms", "\n$text",$match); } } if(preg_match("/<bottom>([\w\:]+)\<\/bottom\>/m",$match,$matches)) { $id = $matches[1]; $text = io_readWikiPage(wikiFN($id, $rev), $id, false); if($text) { $match = preg_replace("/<bottom>.*?<\/bottom>/ms", "\ $text",$match); } } // msg(htmlentities($match)); return array($state, $match); case DOKU_LEXER_EXIT : return array($state, ''); case DOKU_LEXER_SPECIAL: $inner = substr($match,6,-7); return array($state, $inner); } // created in editor, as described at https://www.dokuwiki.org/plugin:ckgedit:deprecated