ignore empty anchors when exporting

This commit is contained in:
Rich Harris
2018-10-24 15:38:45 -04:00
parent e5d7d8ab2b
commit 281e183c61
2 changed files with 3 additions and 2 deletions

View File

@@ -187,6 +187,6 @@ async function _export({
}
function get_href(attrs: string) {
const match = /href\s*=\s*(?:"(.+?)"|'(.+?)'|([^\s>]+))/.exec(attrs);
const match = /href\s*=\s*(?:"(.*?)"|'(.+?)'|([^\s>]+))/.exec(attrs);
return match[1] || match[2] || match[3];
}