Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested parenthesis is broken for pseudo-elements #48

Closed
jrandolf opened this issue Mar 4, 2023 · 1 comment · Fixed by #51
Closed

Nested parenthesis is broken for pseudo-elements #48

jrandolf opened this issue Mar 4, 2023 · 1 comment · Fixed by #51
Labels
bug Something isn't working

Comments

@jrandolf
Copy link
Collaborator

jrandolf commented Mar 4, 2023

Hi 👋 , Puppeteer maintainer here.

We're interested in using parsel for selector parsing in Puppeteer. We are implementing custom functionality into selectors, but found argument parsing for pseudo-elements to be broken. The similar problem with pseudo-classes is working.

MVCE:

// Pseudo-classes: Works!
Input: ':test(a()f)'
Output: [
	{
		"type": "pseudo-class",
		"content": ":test(a()f)",
		"name": "test",
		"argument": "a()f",
		"pos": [
			0,
			11
		]
	}
]
// Pseudo-elements: Broken!
Input: '::test(a()f)'
Output: [
	{
		"type": "pseudo-element",
		"content": "::test(a()f)",
		"name": "test",
		"argument": "a(",
		"pos": [
			0,
			12
		]
	}
]
@LeaVerou
Copy link
Owner

LeaVerou commented Mar 4, 2023

Hey, great to hear you're considering using Parcel for Puppeteer! Which part of Puppeteer, out of curiosity?

I see it was a pretty easy fix, and you've already fixed it in your fork, so I'll just wait for the PR. Thanks for looking into it!

@LeaVerou LeaVerou added the bug Something isn't working label Mar 4, 2023
This was referenced Mar 6, 2023
LeaVerou pushed a commit that referenced this issue Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants