OSDN Git Service

Import current code.
[osdn-codes/wiki-parser.git] / sfjp / wiki / processor / pre.php
1 <?php
2 namespace sfjp\Wiki\Processor;
3 class Pre extends Base {
4         public function process($text) {
5                 $fmt = $this->getFormatter();
6                 $this->formatted_text = $fmt->raw_node("<pre>" . htmlspecialchars($text) . "</pre>");
7                 if (!$this->hasContext("parent_processor"))
8                         $this->formatted_text .= $fmt->cleanup();
9                 return $this;
10         }
11 }