コード例 #1
0
 public function __invoke(Filter $node, Compiler $compiler)
 {
     $parser = new Parser();
     return $parser->parse($this->getNodeString($node, $compiler));
 }
コード例 #2
0
ファイル: Markdown.php プロジェクト: romeoz/rock-markdown
 protected function parseInline($text)
 {
     $elements = parent::parseInline($text);
     // merge special attribute elements to links and images as they are not part of the final absy later
     $relatedElement = null;
     foreach ($elements as $i => $element) {
         if ($element[0] === 'link' || $element[0] === 'image' || $element[0] === 'iframe') {
             $relatedElement = $i;
         } elseif ($element[0] === 'specialAttributes') {
             if ($relatedElement !== null) {
                 $elements[$relatedElement]['attributes'] = $element[1];
                 unset($elements[$i]);
             }
             $relatedElement = null;
         } else {
             $relatedElement = null;
         }
     }
     return $elements;
 }
コード例 #3
0
ファイル: MarkdownParser.php プロジェクト: hscale/fizl-pages
 public function parse($string, $path = null)
 {
     return $this->parser->parse($string);
 }