mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
reference links should be able to have their names on the next line
This commit is contained in:
parent
0352f01c7e
commit
4af89c5087
@ -528,7 +528,7 @@ class Parsedown
|
||||
|
||||
# Reference(d) Link / Image
|
||||
|
||||
if ($this->reference_map and strpos($text, '[') !== FALSE and preg_match_all('/(!?)\[(.+?)\](?:[ ]?\[(.*?)\])?/ms', $text, $matches, PREG_SET_ORDER))
|
||||
if ($this->reference_map and strpos($text, '[') !== FALSE and preg_match_all('/(!?)\[(.+?)\](?:\n?[ ]?\[(.*?)\])?/ms', $text, $matches, PREG_SET_ORDER))
|
||||
{
|
||||
foreach ($matches as $matches)
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
<p>Here's <a href="http://parsedown.org">one</a> on 2 lines.</p>
|
||||
<p>Here's <a href="http://parsedown.org/tests/">one</a> with a different URL.</p>
|
||||
<p>Here's <a href="http://parsedown.org">one</a> with a semantic name.</p>
|
||||
<p>Here's <a href="http://parsedown.org">one</a> with definition name on the next line.</p>
|
||||
<p>Here's [one][404] with no definition.</p>
|
||||
<p>Here's an image: <img alt="Markdown Logo" src="https://raw.github.com/dcurtis/markdown-mark/master/png/32x20-solid.png"></p>
|
||||
<p>Here's an <a href="http://google.com">implicit one</a>.</p>
|
||||
|
@ -22,6 +22,9 @@ Here's [one][website] with a semantic name.
|
||||
|
||||
[website]: http://parsedown.org
|
||||
|
||||
Here's [one]
|
||||
[website] with definition name on the next line.
|
||||
|
||||
Here's [one][404] with no definition.
|
||||
|
||||
Here's an image: ![Markdown Logo][image]
|
||||
|
Loading…
Reference in New Issue
Block a user