Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc51092

Browse filesBrowse files
RyuuGanfb55
authored andcommitted
fix(css-selectors): extend regex to include superscript in range, fix #27 (#28)
1 parent a5f1991 commit dc51092
Copy full SHA for dc51092

File tree

Expand file treeCollapse file tree

2 files changed

+17
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-2
lines changed
Open diff view settings
Collapse file

‎index.js‎

Copy file name to clipboardExpand all lines: index.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
module.exports = parse;
44

5-
var re_name = /^(?:\\.|[\w\-\u00c0-\uFFFF])+/,
5+
var re_name = /^(?:\\.|[\w\-\u00b0-\uFFFF])+/,
66
re_escape = /\\([\da-f]{1,6}\s?|(\s)|.)/ig,
77
//modified version of https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L87
8-
re_attr = /^\s*((?:\\.|[\w\u00c0-\uFFFF\-])+)\s*(?:(\S?)=\s*(?:(['"])([^]*?)\3|(#?(?:\\.|[\w\u00c0-\uFFFF\-])*)|)|)\s*(i)?\]/;
8+
re_attr = /^\s*((?:\\.|[\w\u00b0-\uFFFF\-])+)\s*(?:(\S?)=\s*(?:(['"])([^]*?)\3|(#?(?:\\.|[\w\u00b0-\uFFFF\-])*)|)|)\s*(i)?\]/;
99

1010
var actionTypes = {
1111
__proto__: null,
Collapse file

‎tests/test.js‎

Copy file name to clipboardExpand all lines: tests/test.js
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,21 @@ var tests = [
162162
],
163163
"Space after escaped space"
164164
],
165+
[
166+
".m™²³",
167+
[
168+
[
169+
{
170+
type: "attribute",
171+
name: "class",
172+
action: "element",
173+
value: "m™²³",
174+
ignoreCase: false
175+
}
176+
]
177+
],
178+
"Special charecters in selector"
179+
],
165180
[
166181
"\\61 ",
167182
[

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.