Support style and identifier lists in escaped strings.
Example:
.foo {
transition: ~"border-color ease-in-out .15s,
box-shadow ease-in-out .15s";
}
This commit is contained in:
@@ -174,6 +174,15 @@ class LessLexer:
|
||||
r'@\{[^@\}]+\}'
|
||||
return t
|
||||
|
||||
def t_iselector_t_eclose(self, t):
|
||||
r'"|\''
|
||||
# Can only happen if iselector state is on top of estring state.
|
||||
#
|
||||
# Example: @item: ~".col-xs-@{index}";
|
||||
#
|
||||
t.lexer.pop_state()
|
||||
return t
|
||||
|
||||
def t_iselector_css_filter(self, t):
|
||||
(r'\[[^\]]*\]'
|
||||
'|(not|lang|nth-[a-z\-]+)\(.+\)'
|
||||
|
||||
@@ -664,7 +664,8 @@ class LessParser(object):
|
||||
#
|
||||
|
||||
def p_escaped_string(self, p):
|
||||
""" estring : t_eopen style t_eclose
|
||||
""" estring : t_eopen style_list t_eclose
|
||||
| t_eopen identifier_list t_eclose
|
||||
"""
|
||||
p[0] = p[2]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user