Skip to content

Commit

Permalink
refactor: rename comb option to safelist
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Nov 19, 2024
1 parent 58f2e9c commit 89d7051
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/transformers/comb.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const posthtmlPlugin = options => tree => {
{ heads: '{{', tails: '}}' },
{ heads: '{%', tails: '%}' },
],
whitelist: [...defaultSafelist, ...get(options, 'whitelist', [])]
whitelist: [...defaultSafelist, ...get(options, 'safelist', [])]
}

options = merge(options, defaultOptions)
Expand Down
6 changes: 3 additions & 3 deletions test/transformers/purgeCSS.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe.concurrent('Purge CSS', () => {
}
.foo {color: red}
.foo:hover {color: blue}
.bar-baz {color: blue}
.should-keep {color: blue}
.should-remove {color: white}
</style>
</head>
Expand All @@ -27,7 +27,7 @@ describe.concurrent('Purge CSS', () => {
backend: [
{ heads: '{{', tails: '}}' }
],
whitelist: ['.bar*']
safelist: ['*keep*']
}

const expected = `<!DOCTYPE html>
Expand All @@ -36,7 +36,7 @@ describe.concurrent('Purge CSS', () => {
<style>
.foo {color: red}
.foo:hover {color: blue}
.bar-baz {color: blue}
.should-keep {color: blue}
</style>
</head>
<body>
Expand Down

0 comments on commit 89d7051

Please sign in to comment.