Merge pull request #11472 from Bouncey/fix/replaceNBSP

Fix/Replace nbsp in campers code
pull/11538/head
Jonathan 2016-11-04 13:11:36 +00:00 committed by GitHub
commit 9a171940c6
1 changed files with 10 additions and 0 deletions

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
);
}
}
]
};