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;
|
||||
|
||||
if (! $('[')) return;
|
||||
if ((key = $(this.tag)) &&
|
||||
(op = $(/[|~*$^]?=/g)) &&
|
||||
(val = $(this.entities.string) || $(/[a-zA-Z0-9_-]+/g))) {
|
||||
attr = [key, op, val].join('');
|
||||
} else if (val = $(this.tag) || $(this.entities.string)) {
|
||||
attr = val;
|
||||
|
||||
if (key = $(/[a-z]+/g) || $(this.entities.string)) {
|
||||
if ((op = $(/[|~*$^]?=/g)) &&
|
||||
(val = $(this.entities.string) || $(/[\w-]+/g))) {
|
||||
attr = [key, op, val].join('');
|
||||
} else { attr = key }
|
||||
}
|
||||
|
||||
if (! $(']')) return;
|
||||
|
||||
if (attr) { return "[" + attr + "]" }
|
||||
|
Loading…
Reference in New Issue
Block a user