fixes
This commit is contained in:
parent
95bbe73832
commit
665849615c
7 changed files with 10 additions and 16 deletions
|
|
@ -154,7 +154,7 @@ const registration = {
|
|||
})
|
||||
},
|
||||
replaceNewlines(str) {
|
||||
return str.replaceAll('\s*\n\s*', ' \n')
|
||||
return str.replaceAll(/\s*\n\s*/g, ' \n')
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ export default {
|
|||
[
|
||||
'admin_dash',
|
||||
'temp_overrides',
|
||||
...this.canonPath.map((p) => p.replaceAll('\.', '_DOT_')),
|
||||
...this.canonPath.map((p) => p.replaceAll('.', '_DOT_')),
|
||||
'label',
|
||||
].join('.'),
|
||||
)
|
||||
|
|
@ -198,7 +198,7 @@ export default {
|
|||
[
|
||||
'admin_dash',
|
||||
'temp_overrides',
|
||||
...this.canonPath.map((p) => p.replaceAll('\.', '_DOT_')),
|
||||
...this.canonPath.map((p) => p.replaceAll('.', '_DOT_')),
|
||||
'description',
|
||||
].join('.'),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ export const parseUser = (data) => {
|
|||
})
|
||||
output.fields_text = data.fields.map((field) => {
|
||||
return {
|
||||
name: unescape(field.name.replaceAll('<[^>]*>', '')),
|
||||
value: unescape(field.value.replaceAll('<[^>]*>', '')),
|
||||
name: unescape(field.name.replaceAll(/<[^>]*>/g, '')),
|
||||
value: unescape(field.value.replaceAll(/<[^>]*>/g, '')),
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const createStyleSheet = (id, priority = 1000) => {
|
|||
addRule(rule) {
|
||||
let newRule = rule
|
||||
if (!CSS.supports?.('backdrop-filter', 'blur()')) {
|
||||
newRule = newRule.replaceAll('backdrop-filter:[^;]+;', '') // Remove backdrop-filter
|
||||
newRule = newRule.replaceAll(/backdrop-filter:[^;]+;/g, '') // Remove backdrop-filter
|
||||
}
|
||||
|
||||
if (newRule.startsWith('::-webkit')) {
|
||||
|
|
@ -44,7 +44,7 @@ export const createStyleSheet = (id, priority = 1000) => {
|
|||
}
|
||||
|
||||
this.rules.push(
|
||||
newRule.replaceAll('var\(--shadowFilter\)[^;]*;', ''), // Remove shadowFilter references
|
||||
newRule.replaceAll(/var\(--shadowFilter\)[^;]*;/g, ''), // Remove shadowFilter references
|
||||
)
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,12 +111,6 @@ export const genericRuleToSelector =
|
|||
if (ignoreOutOfTreeSelector || liteMode)
|
||||
arraySelector = [arraySelector[0]]
|
||||
return arraySelector
|
||||
.sort((a) => {
|
||||
if (a.startsWith(':')) return 1
|
||||
if (/^[a-z]/.exec(a)) return -1
|
||||
else return 0
|
||||
})
|
||||
.join('')
|
||||
})
|
||||
|
||||
const statesSelectorsFlat = statesSelectors.reduce((acc, s) => {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const highlightStyle = (prefs) => {
|
|||
|
||||
const highlightClass = (user) => {
|
||||
return (
|
||||
'USER____' + user.screen_name?.replaceAll('\.', '_').replace(/@/g, '_AT_')
|
||||
'USER____' + user.screen_name?.replaceAll('.', '_').replace(/@/g, '_AT_')
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ describe('RichContent', () => {
|
|||
})
|
||||
|
||||
expect(
|
||||
wrapper.html().replaceAll('\n', '').replaceAll('<!--.*?-->', ''),
|
||||
wrapper.html().replaceAll('\n', '').replaceAll(/<!--.*?-->/g, ''),
|
||||
).to.eql(compwrap(expected))
|
||||
})
|
||||
|
||||
|
|
@ -433,7 +433,7 @@ describe('RichContent', () => {
|
|||
})
|
||||
|
||||
expect(
|
||||
wrapper.html().replaceAll('\n', '').replaceAll('<!--.*?-->', ''),
|
||||
wrapper.html().replaceAll('\n', '').replaceAll(/<!--.*?-->/g, ''),
|
||||
).to.eql(compwrap(expected))
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue