Beispiel #1
0
 /**
  * @inheritdoc
  */
 protected function renderLink($block)
 {
     $result = parent::renderLink($block);
     // 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;
 }
Beispiel #2
0
 /**
  * @inheritdoc
  */
 protected function renderLink($block)
 {
     $result = parent::renderLink($block);
     // add special syntax for linking to the guide
     $result = preg_replace_callback('/href="([A-z0-9-.#]+).md"/i', function ($match) {
         return 'href="/docs/' . $match[1] . '"';
     }, $result, 1);
     return $result;
 }