Use \f rather than \x0C for whitespace form feed (#2158)

This commit is contained in:
toasted-nutbread 2022-05-22 13:11:38 -04:00 committed by GitHub
parent 259a3031ce
commit 756cfc0276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -53,8 +53,7 @@ class CssStyleApplier {
this._styleDataUrl = styleDataUrl;
this._styleData = [];
this._cachedRules = new Map();
// eslint-disable-next-line no-control-regex
this._patternHtmlWhitespace = /[\t\r\n\x0C ]+/g;
this._patternHtmlWhitespace = /[\t\r\n\f ]+/g;
this._patternClassNameCharacter = /[0-9a-zA-Z-_]/;
}

View File

@ -22,8 +22,7 @@
class SimpleDOMParser {
constructor(content) {
this._document = parse5.parse(content);
// eslint-disable-next-line no-control-regex
this._patternHtmlWhitespace = /[\t\r\n\x0C ]+/g;
this._patternHtmlWhitespace = /[\t\r\n\f ]+/g;
}
getElementById(id, root=null) {