protected function inlineImage($Excerpt)
 {
     if (!isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') {
         return;
     }
     $link = parent::inlineLink(['text' => substr($Excerpt['text'], 1), 'context' => substr($Excerpt['text'], 1)]);
     $link['extent'] += 1;
     return $link;
 }
Esempio n. 2
0
 protected function inlineLink($Excerpt)
 {
     $res = parent::inlineLink($Excerpt);
     $href = $res['element']['attributes']['href'];
     if (isset($href)) {
         if (preg_match('/^javascript\\:/i', $href)) {
             $res['element']['attributes']['href'] = NULL;
         }
     }
     return $res;
 }
Esempio n. 3
0
 protected function inlineLink($Excerpt)
 {
     $Link = parent::inlineLink($Excerpt);
     $remainder = substr($Excerpt['text'], $Link['extent']);
     if (preg_match('/^[ ]*{(' . $this->regexAttribute . '+)}/', $remainder, $matches)) {
         $Link['element']['attributes'] += $this->parseAttributeData($matches[1]);
         $Link['extent'] += strlen($matches[0]);
     }
     return $Link;
 }
Esempio n. 4
0
 /**
  * add target blank for external links
  **/
 protected function inlineLink($Excerpt)
 {
     $Excerpt = parent::inlineLink($Excerpt);
     $Excerpt = self::addLinkTargetBlank($Excerpt);
     return $Excerpt;
 }
Esempio n. 5
0
 protected function inlineLink($excerpt)
 {
     $Span = parent::inlineLink($excerpt);
     $remainder = substr($excerpt, $Span['extent']);
     if (preg_match('/^[ ]*{(' . $this->regexAttribute . '+)}/', $remainder, $matches)) {
         $Span['element']['attributes'] += $this->attributeData($matches[1]);
         $Span['extent'] += strlen($matches[0]);
     }
     return $Span;
 }
 /**
  * Add the current base url to all local links.
  *
  *     [filesystem](about.filesystem "Optional title")
  *
  * @param   string  span text
  *
  * @return  string
  */
 protected function inlineLink($Excerpt)
 {
     $Excerpt['text'] = preg_replace('~(?<!!)(\\[.+?\\]\\()(\\/docs\\/\\{\\{version\\}\\}\\/){0,1}(?!\\w++://)(?!#)(\\S*(?:\\s*+".+?")?\\))~', '$1' . static::$baseUrl . '/$3', $Excerpt['text']);
     return parent::inlineLink($Excerpt);
 }