fixed parsing of [disabled]
style attribute selectors
This commit is contained in:
parent
7b96181f06
commit
c041deacdb
@ -334,13 +334,14 @@ less.parser = {
|
|||||||
var attr = '', key, val, op;
|
var attr = '', key, val, op;
|
||||||
|
|
||||||
if (! $('[')) return;
|
if (! $('[')) return;
|
||||||
if ((key = $(this.tag)) &&
|
|
||||||
(op = $(/[|~*$^]?=/g)) &&
|
if (key = $(/[a-z]+/g) || $(this.entities.string)) {
|
||||||
(val = $(this.entities.string) || $(/[a-zA-Z0-9_-]+/g))) {
|
if ((op = $(/[|~*$^]?=/g)) &&
|
||||||
attr = [key, op, val].join('');
|
(val = $(this.entities.string) || $(/[\w-]+/g))) {
|
||||||
} else if (val = $(this.tag) || $(this.entities.string)) {
|
attr = [key, op, val].join('');
|
||||||
attr = val;
|
} else { attr = key }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $(']')) return;
|
if (! $(']')) return;
|
||||||
|
|
||||||
if (attr) { return "[" + attr + "]" }
|
if (attr) { return "[" + attr + "]" }
|
||||||
|
Loading…
Reference in New Issue
Block a user