4 This is another workaround plugin providing <code>...</code> and
5 <php>...</php> escapes for the current rendering kernel.
9 $ewiki_plugins["render"][0] = "ewiki_format_pre_code";
12 function ewiki_format_pre_code($wsrc, $sl=1, $hl=EWIKI_ALLOW_HTML, $sh=0) {
17 while (preg_match("#^(.*?\n)?<(code>|php>|\?php|\?)(.+?)\n(</code|</php|\?)>#s", $wsrc, $uu) && ($loop--)) {
21 $wsrc = substr($wsrc, strlen($uu[0]));
23 $html .= ewiki_format($rend, $sl,$hl,$sh);
25 ewiki_format_pre_code_escape($code, $uu[2]!="code>") .
31 $html .= ewiki_format($wsrc, $sl,$hl,$sh);
37 function ewiki_format_pre_code_escape($html, $highl) {
39 $html = trim($html, "\n");
43 $html = highlight_string($html);
44 $html = ob_get_contents();