From 89d705145ee1ac766725092e2009be8efae2dd60 Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Tue, 19 Nov 2024 19:20:18 +0200 Subject: [PATCH] refactor: rename comb option to safelist --- src/transformers/comb.js | 2 +- test/transformers/purgeCSS.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/transformers/comb.js b/src/transformers/comb.js index ad7e343c..60f83e3c 100644 --- a/src/transformers/comb.js +++ b/src/transformers/comb.js @@ -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) diff --git a/test/transformers/purgeCSS.test.js b/test/transformers/purgeCSS.test.js index 6f7d2236..832eea50 100644 --- a/test/transformers/purgeCSS.test.js +++ b/test/transformers/purgeCSS.test.js @@ -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} @@ -27,7 +27,7 @@ describe.concurrent('Purge CSS', () => { backend: [ { heads: '{{', tails: '}}' } ], - whitelist: ['.bar*'] + safelist: ['*keep*'] } const expected = ` @@ -36,7 +36,7 @@ describe.concurrent('Purge CSS', () => {