mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Fixes #283
This commit is contained in:
parent
6c9df528aa
commit
b828fe7c8d
@ -1197,7 +1197,7 @@ class Parsedown
|
||||
return;
|
||||
}
|
||||
|
||||
if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]+"|\'[^\']+\'))?[)]/', $remainder, $matches))
|
||||
if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches))
|
||||
{
|
||||
$Element['attributes']['href'] = $matches[1];
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
<p><img src="/md.png" alt="alt" title="title" /></p>
|
||||
<p><img src="/md.png" alt="alt" title="title" /></p>
|
||||
<p><img src="/md.png" alt="blank title" title="" /></p>
|
@ -1 +1,3 @@
|
||||
![alt](/md.png "title")
|
||||
![alt](/md.png "title")
|
||||
|
||||
![blank title](/md.png "")
|
@ -1,4 +1,6 @@
|
||||
<p><a href="http://example.com" title="Title">single quotes</a></p>
|
||||
<p><a href="http://example.com" title="Title">double quotes</a></p>
|
||||
<p><a href="http://example.com" title="">single quotes blank</a></p>
|
||||
<p><a href="http://example.com" title="">double quotes blank</a></p>
|
||||
<p><a href="http://example.com" title="2 Words">space</a></p>
|
||||
<p><a href="http://example.com/url-(parentheses)" title="Title">parentheses</a></p>
|
@ -2,6 +2,10 @@
|
||||
|
||||
[double quotes](http://example.com "Title")
|
||||
|
||||
[single quotes blank](http://example.com '')
|
||||
|
||||
[double quotes blank](http://example.com "")
|
||||
|
||||
[space](http://example.com "2 Words")
|
||||
|
||||
[parentheses](http://example.com/url-(parentheses) "Title")
|
Loading…
Reference in New Issue
Block a user