X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fmarkdownify%2Fmarkdownify.php;h=0d4429a01336e10d9ce17ab43170201ae874bef1;hb=0f4decf74e4c2a19956e0bbab00ced84521f76b6;hp=43730cb77fd8073770d43e9f886628c1e7176fb5;hpb=b97c406c825004f87a74d310533c8bfbd0fc5218;p=friendica.git diff --git a/include/markdownify/markdownify.php b/include/markdownify/markdownify.php index 43730cb77f..0d4429a013 100644 --- a/include/markdownify/markdownify.php +++ b/include/markdownify/markdownify.php @@ -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 tags @@ -1181,4 +1194,4 @@ class Markdownify { function parent() { return end($this->parser->openTags); } -} \ No newline at end of file +}