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

attributes: remove unneeded escapes #1635

Merged
merged 1 commit into from Jan 2, 2021
Merged

attributes: remove unneeded escapes #1635

merged 1 commit into from Jan 2, 2021

Conversation

XhmikosR
Copy link
Contributor

@XhmikosR XhmikosR commented Jan 2, 2021

No description provided.

@XhmikosR XhmikosR marked this pull request as ready for review January 2, 2021 08:05
@@ -23,7 +23,7 @@ var primitives = {
// Attributes that are booleans
var rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i;
// Matches strings that look like JSON objects or arrays
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;
var rbrace = /^(?:{[\w\W]*}|\[[\w\W]*])$/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To simplify further, this should be equivalent:

Suggested change
var rbrace = /^(?:{[\w\W]*}|\[[\w\W]*])$/;
var rbrace = /^(?:{[^]*}|\[[^]*])$/;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just split the patch from my xo branch, but feel free to tweak it later. I can't check if your suggestion is fine right now :)

@fb55 fb55 merged commit bfa114e into cheeriojs:main Jan 2, 2021
@fb55
Copy link
Member

fb55 commented Jan 2, 2021

Thanks!

@XhmikosR XhmikosR deleted the patch-3 branch January 3, 2021 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants