Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitdc51092

Browse files
RyuuGanfb55
authored andcommitted
fix(css-selectors): extend regex to include superscript in range,fix#27 (#28)
1 parenta5f1991 commitdc51092

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

‎index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
module.exports=parse;
44

5-
varre_name=/^(?:\\.|[\w\-\u00c0-\uFFFF])+/,
5+
varre_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
varactionTypes={
1111
__proto__:null,

‎tests/test.js‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp