Просмотр исходного кода

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
Estevao Soares dos Santos 6 лет назад
Родитель
Сommit
63763b136f

+ 3 - 0
test/functional/makehtml/cases/issues/#585.error-when-using-image-references.html

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

+ 0 - 0
test/functional/makehtml/cases/issues/#585.error-when-using-image-references.md