Change skipped node types to use a switch statement
This commit is contained in:
parent
8195e5109b
commit
8110de514e
@ -87,8 +87,10 @@ class TextSourceRange {
|
||||
return false;
|
||||
}
|
||||
|
||||
const skip = ['RT', 'SCRIPT', 'STYLE'];
|
||||
if (skip.includes(node.nodeName.toUpperCase())) {
|
||||
switch (node.nodeName.toUpperCase()) {
|
||||
case 'RT':
|
||||
case 'SCRIPT':
|
||||
case 'STYLE':
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user