Beispiel #1
0
 /**
  * @inheritdoc
  */
 protected function parseLink($markdown)
 {
     list($result, $skip) = parent::parseLink($markdown);
     // add special syntax for linking to the guide
     $result = preg_replace_callback('/href="guide:([A-z0-9-.#]+)"/i', function ($match) {
         return 'href="' . static::$renderer->generateGuideUrl($match[1]) . '"';
     }, $result, 1);
     return [$result, $skip];
 }
Beispiel #2
0
 /**
  * Make all links use the rel="noreferrer" attribute
  *
  * @param $markdown
  * @return array
  */
 protected function parseLink($markdown)
 {
     $array = parent::parseLink($markdown);
     $array[0] = $this->addNoReferrerAttribute($array[0]);
     return $array;
 }