@@ -1421,9 +1421,12 @@ namespace Sass {
1421
1421
{ return new (ctx.mem ) Textual (pstate, Textual::PERCENTAGE, lexed); }
1422
1422
1423
1423
// match hex number first because 0x000 looks like a number followed by an indentifier
1424
- if (lex< alternatives< hex, hex0 > >())
1424
+ if (lex< sequence < alternatives< hex, hex0 >, negate < exactly< ' - ' > > > >())
1425
1425
{ return new (ctx.mem ) Textual (pstate, Textual::HEX, lexed); }
1426
1426
1427
+ if (lex< sequence < exactly <' #' >, identifier > >())
1428
+ { return new (ctx.mem ) String_Quoted (pstate, lexed); }
1429
+
1427
1430
// also handle the 10em- foo special case
1428
1431
if (lex< sequence< dimension, optional< sequence< exactly<' -' >, negate< digit > > > > >())
1429
1432
{ return new (ctx.mem ) Textual (pstate, Textual::DIMENSION, lexed); }
@@ -1639,9 +1642,12 @@ namespace Sass {
1639
1642
(*schema) << new (ctx.mem ) Textual (pstate, Textual::NUMBER, lexed);
1640
1643
}
1641
1644
// lex hex color value
1642
- else if (lex< hex >()) {
1645
+ else if (lex< sequence < hex, negate < exactly < ' - ' > > > >()) {
1643
1646
(*schema) << new (ctx.mem ) Textual (pstate, Textual::HEX, lexed);
1644
1647
}
1648
+ else if (lex< sequence < exactly <' #' >, identifier > >()) {
1649
+ (*schema) << new (ctx.mem ) String_Quoted (pstate, lexed);
1650
+ }
1645
1651
// lex a value in parentheses
1646
1652
else if (peek< parenthese_scope >()) {
1647
1653
(*schema) << parse_factor ();
0 commit comments