Skip to content

attributes: remove unneeded escapes#1635

Merged
fb55 merged 1 commit intocheeriojs:mainfrom
XhmikosR:patch-3
Jan 2, 2021
Merged

attributes: remove unneeded escapes#1635
fb55 merged 1 commit intocheeriojs:mainfrom
XhmikosR:patch-3

Conversation

@XhmikosR
Copy link
Copy Markdown
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
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

2 participants