es6-css-minify icon indicating copy to clipboard operation
es6-css-minify copied to clipboard

how to input regex in setting.json?

Open Mofred1 opened this issue 3 years ago • 2 comments

Hi all I am trying to shorten this list "reserved": ["MW_Start","MW_inputClick","MW_Image","MW_buttonPressed","MW_inputClick","MW_changeMainSel","MW_changeImgSel"],

with "keep_fnames": "/^MW_/",

but I cant find the right regex format. How is the correct input? Mani

Mofred1 avatar Sep 12 '22 11:09 Mofred1

I don't actually know if regex is supported in json configs. Your regex is not quite right, I think it should be something like "/^MW_.*/", otherwise only functions named "MW_" will match.

olback avatar Sep 13 '22 10:09 olback

Thanks for the answer, but I tried it also. I found in the code that keep_fnames allows String and Boolean input, therefore there should be the possibility for regex.

Best regards Mani

From: Edwin @.*** Sent: Tuesday, September 13, 2022 12:26 PM To: olback/es6-css-minify @.> Cc: Mofred1 @.>; Author @.***> Subject: Re: [olback/es6-css-minify] how to input regex in setting.json? (Issue #149)

I don't actually know if regex is supported in json configs. Your regex is not quite right, I think it should be something like "/^MW_.*/", otherwise only functions named "MW_" will match.

— Reply to this email directly, view it on GitHubhttps://github.com/olback/es6-css-minify/issues/149#issuecomment-1245210437, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANPYTPPPX7IQM5AF5B3ZSVTV6BJCLANCNFSM6AAAAAAQKL3IK4. You are receiving this because you authored the thread.Message ID: @.***>

Mofred1 avatar Sep 13 '22 17:09 Mofred1