From eaa75f94b451606e6e5c03cb6c7a76f52397f75a Mon Sep 17 00:00:00 2001 From: Alex Macpherson Date: Tue, 22 Jul 2025 15:34:01 +0100 Subject: [PATCH 1/2] Added `-moz-read-only` to `pseudo-nop` regex. - Fixes #150 - Unclear if this is the best approach, as it won't handle support for other `-moz-*` pseudo-classes. - Also unsure whether this would be better placed in the `inputstate` regex rather than `pseudo_nop`, but couldn't get it working nicely there with the capture groups and existing parsing for the `read-only` pseudo-class - open to suggestions if this would be more appropriate! --- src/nwsapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nwsapi.js b/src/nwsapi.js index d145c6b..685d931 100644 --- a/src/nwsapi.js +++ b/src/nwsapi.js @@ -91,7 +91,7 @@ disp_state: '(open|closed|modal|fullscreen|picture-in-picture)\\b', time_state: '(current|past|future)\\b', // pseudo-classes for parsing only selectors - pseudo_nop: '(autofill|-webkit\\-autofill)\\b', + pseudo_nop: '(autofill|-webkit\\-autofill|-moz\\-read\\-only)\\b', // pseudo-elements starting with single colon (:) pseudo_sng: '(after|before|first\\-letter|first\\-line)\\b', // pseudo-elements starting with double colon (::) From e16ae288e9cd11dc4eacea3eb9af9bd3cc086637 Mon Sep 17 00:00:00 2001 From: Alex Macpherson Date: Wed, 23 Jul 2025 10:15:51 +0100 Subject: [PATCH 2/2] Update no-op regex to generically capture all vendor extensions. --- src/nwsapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nwsapi.js b/src/nwsapi.js index 685d931..6daff9b 100644 --- a/src/nwsapi.js +++ b/src/nwsapi.js @@ -91,7 +91,7 @@ disp_state: '(open|closed|modal|fullscreen|picture-in-picture)\\b', time_state: '(current|past|future)\\b', // pseudo-classes for parsing only selectors - pseudo_nop: '(autofill|-webkit\\-autofill|-moz\\-read\\-only)\\b', + pseudo_nop: '(autofill|-webkit\\-autofill|[-](?:webkit|moz|op|ms)(?:[-][a-zA-Z0-9]{2,})+)\\b', // pseudo-elements starting with single colon (:) pseudo_sng: '(after|before|first\\-letter|first\\-line)\\b', // pseudo-elements starting with double colon (::)