better splitting of selectors (#1440)

* better splitting of selectors - overlapping with #1401 
* Add test from example at https://github.com/PostHog/posthog/pull/21427
* ignore brackets inside selector strings
* Add another test as noticed that it's possible to escape strings
* Ensure we are ignoring commas within strings

Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
This commit is contained in:
David Newell
2026-04-01 12:00:00 +08:00
committed by GitHub
parent a736f72e0f
commit 28f32140f0
3 changed files with 60 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'rrweb-snapshot': patch
---
better nested css selector splitting when commas or brackets happen to be in quoted text