From 5396f27d8f607ab8a082402c12e2f175690f5afe Mon Sep 17 00:00:00 2001 From: Simon Tretter Date: Sat, 1 Feb 2020 02:13:29 +0100 Subject: [PATCH] fix: readme example updates for new syntax --- README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 21d1574..810f0a6 100755 --- a/README.md +++ b/README.md @@ -70,10 +70,8 @@ Before diving into the individual attributes, here are the default settings of t whitelist: ['body', 'html', 'nuxt-progress'], extractors: [ { - extractor: class { - static extract(content) { - return content.match(/[A-z0-9-:\\/]+/g) - } + extractor(content) { + return content.match(/[A-z0-9-:\\/]+/g) }, extensions: ['html', 'vue', 'js'] } @@ -198,18 +196,14 @@ export default { purgeCSS: { extractors: () => [ { - extractor: class { - static extract(content) { - return content.match(/[A-z0-9-:\\/]+/g) - } + extractor: (content) { + return content.match(/[A-z0-9-:\\/]+/g) }, extensions: ['html', 'vue', 'js'] }, { - extractor: class { - static extract(content) { - return content.match(/[A-z0-9-\\/]+/g) - } + extractor(content) { + return content.match(/[A-z0-9-\\/]+/g) }, extensions: ['vue'] // This will not work, because the above extractor is applied to 'vue' already. }