Merge pull request #11472 from Bouncey/fix/replaceNBSP
Fix/Replace nbsp in campers code
This commit is contained in:
@ -26,6 +26,16 @@ const transformersForHtmlJS = {
|
|||||||
transformer: function addLoopProtect(file) {
|
transformer: function addLoopProtect(file) {
|
||||||
return updateContents(loopProtect(file.contents), 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
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user