mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-19 22:05:20 +00:00
Merge pull request #491 from sveltejs/empty-href-export
ignore empty anchors when exporting
This commit is contained in:
@@ -187,6 +187,6 @@ async function _export({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_href(attrs: string) {
|
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];
|
return match[1] || match[2] || match[3];
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
<h1>Great success!</h1>
|
<h1>Great success!</h1>
|
||||||
|
|
||||||
<a href="blog">blog</a>
|
<a href="blog">blog</a>
|
||||||
|
<a href="">empty anchor</a>
|
||||||
Reference in New Issue
Block a user