]> git.mxchange.org Git - friendica.git/blobdiff - include/markdownify/markdownify.php
using the recycle sign instead of "RD" for statusnet.
[friendica.git] / include / markdownify / markdownify.php
index 43730cb77fd8073770d43e9f886628c1e7176fb5..0d4429a01336e10d9ce17ab43170201ae874bef1 100644 (file)
@@ -686,6 +686,10 @@ class Markdownify {
         #  [1]: mailto:mail@example.com Title
         $tag['href'] = 'mailto:'.$bufferDecoded;
       }
+
+      $this->out('['.$buffer.']('.$tag['href'].' "'.$tag['title'].'")', true);
+
+/*
       # [This link][id]
       foreach ($this->stack['a'] as $tag2) {
         if ($tag2['href'] == $tag['href'] && $tag2['title'] === $tag['title']) {
@@ -699,6 +703,7 @@ class Markdownify {
       }
 
       $this->out('['.$buffer.']['.$tag['linkID'].']', true);
+*/
     }
   }
   /**
@@ -735,6 +740,13 @@ class Markdownify {
       $this->parser->tagAttributes['src'] = $this->decode($this->parser->tagAttributes['src']);
     }
 
+// ![Alt text](/path/to/img.jpg "Optional title")
+    if ($this->parser->tagAttributes['title'] != "")
+      $this->out('!['.$this->parser->tagAttributes['alt'].']('.$this->parser->tagAttributes['src'].' "'.$this->parser->tagAttributes['title'].'")', true);
+    else
+      $this->out('!['.$this->parser->tagAttributes['alt'].']('.$this->parser->tagAttributes['src'].')', true);
+
+/*
     # [This link][id]
     $link_id = false;
     if (!empty($this->stack['a'])) {
@@ -759,6 +771,7 @@ class Markdownify {
     }
 
     $this->out('!['.$this->parser->tagAttributes['alt'].']['.$link_id.']', true);
+*/
   }
   /**
    * handle <code> tags
@@ -1181,4 +1194,4 @@ class Markdownify {
   function parent() {
     return end($this->parser->openTags);
   }
-}
\ No newline at end of file
+}