2 namespace sfjp\Wiki\Processor;
3 require_once 'include/general/syntax-highlight.php';
4 class Code extends Base {
5 public function process($text) {
7 $lang = $this->getArgs(0);
8 $fmt = $this->getFormatter();
9 $ret = $fmt->raw_node(highlight_syntax(trim($text, "\r\n"), $lang));
10 if (!$this->hasContext("parent_processor"))
11 $ret .= $this->getFormatter()->cleanup();
12 $this->formatted_text = $ret;