示例#1
0
文件: Markdown.php 项目: aivavic/yii2
 /**
  * @inheritDoc
  */
 protected function identifyLine($lines, $current)
 {
     if (isset($lines[$current]) && (strncmp($lines[$current], '```', 3) === 0 || strncmp($lines[$current], '~~~', 3) === 0)) {
         return 'fencedCode';
     }
     return parent::identifyLine($lines, $current);
 }
示例#2
0
文件: Post.php 项目: dsmithhayes/flat
 /**
  * This will effectively render all of the markdown in the file to its
  * appropriate HTML
  *
  * @return string
  *      The rendered HTML of the PostFile content
  */
 public function html() : string
 {
     return $this->parser->parse($this->raw());
 }