Fix/Replace nbsp in campers code

This commit is contained in:
Stuart Taylor
2016-10-30 23:36:25 +00:00
parent 17471343d3
commit e9d67eda97

View File

@@ -26,6 +26,16 @@ const transformersForHtmlJS = {
transformer: function addLoopProtect(file) {
return updateContents(loopProtect(file.contents), file);
}
},
{
name: 'replace-nbsp',
nbspRegExp: new RegExp(String.fromCharCode(160), 'g'),
transformer: function replaceNBSP(file) {
return updateContents(
file.contents.replace(this.nbspRegExp, ' '),
file
);
}
}
]
};