Beispiel #1
0
 public function __construct($data, $parser = null)
 {
     $this->file = isset($data['file']) ? $data['file'] : NULL;
     $this->text = isset($data['text']) ? $data['text'] : NULL;
     if ($this->file) {
         if (!file_exists($this->file)) {
             throw new PageNotFoundException("Page Not Found:{$this->file}");
         }
         $this->text = file_get_contents($this->file);
     }
     if (!$parser) {
         $parser = new TipiMarkdownExt();
     }
     $this->output = $parser->transform($this->text);
     $this->meta['headers'] = $parser->getHeaders();
 }
Beispiel #2
0
 function blockQuote($matches)
 {
     self::$quote_class = empty($matches[2]) ? '' : $matches[2];
     return $matches[3];
 }