Merge pull request #2279 from cgross/master

Remove livereload cache buster param in extractId
This commit is contained in:
Luke Page
2014-11-09 17:16:46 +00:00

View File

@@ -1,6 +1,7 @@
module.exports = {
extractId: function(href) {
return href.replace(/^[a-z-]+:\/+?[^\/]+/, '' ) // Remove protocol & domain
.replace(/[\?\&]livereload=\w+/,'' ) // Remove LiveReload cachebuster
.replace(/^\//, '' ) // Remove root /
.replace(/\.[a-zA-Z]+$/, '' ) // Remove simple extension
.replace(/[^\.\w-]+/g, '-') // Replace illegal characters