fix(images): fix error when using image references

In some circumstances, on a reference style image, the last capturing
group is ignored, which causes the fucntion argument to return the number
of matches instead of a string (or undefined).
Checking if the title parameter is a string ensures that the title
parameter is actually something that was caught by the regex and not some
metadata.

Closes #585
This commit is contained in:
Estevao Soares dos Santos 2018-09-14 15:40:18 +01:00
parent fc7ac1e1ca
commit 63763b136f
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1,3 @@
[![the-image]]
[the-image]: http://example.com/foo.png