Use ? instead of * to match tooltips in Markdown links.

This commit is contained in:
Nuno Santos 2013-12-03 20:12:56 +01:00
parent 66197d54ee
commit 91f10f9b40

View File

@ -234,7 +234,7 @@ h1{
// Parse Markdown links in the text
// credit: http://stackoverflow.com/a/9268827
var link = null;
while(link = d.text.match(/\[([^\]]+)\]\(([^)"]+)(?: \"([^\"]+)\")*\)/)) {
while(link = d.text.match(/\[([^\]]+)\]\(([^)"]+)(?: \"([^\"]+)\")?\)/)) {
var link_attr = "";
if (link[3] !== undefined) {
link_attr = " title='" + link[3] + "'";