Skip to content

Commit 86b0ded

Browse files
committed
Merge pull request #2026 from mgreter/bugfix/issue_2023
Relax parsing rules for type selector to start with number
2 parents 445ad3c + ac9efc3 commit 86b0ded

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/prelexer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ namespace Sass {
586586
}
587587

588588
const char* hyphens_and_identifier(const char* src) {
589-
return sequence< zero_plus< exactly< '-' > >, identifier >(src);
589+
return sequence< zero_plus< exactly< '-' > >, identifier_alnums >(src);
590590
}
591591
const char* hyphens_and_name(const char* src) {
592592
return sequence< zero_plus< exactly< '-' > >, name >(src);
@@ -596,11 +596,11 @@ namespace Sass {
596596
}
597597
// Match CSS id names.
598598
const char* id_name(const char* src) {
599-
return sequence<exactly<'#'>, identifier>(src);
599+
return sequence<exactly<'#'>, identifier_alnums >(src);
600600
}
601601
// Match CSS class names.
602602
const char* class_name(const char* src) {
603-
return sequence<exactly<'.'>, identifier>(src);
603+
return sequence<exactly<'.'>, identifier_alnums >(src);
604604
}
605605
// Attribute name in an attribute selector.
606606
const char* attribute_name(const char* src) {
@@ -609,7 +609,7 @@ namespace Sass {
609609
}
610610
// match placeholder selectors
611611
const char* placeholder(const char* src) {
612-
return sequence<exactly<'%'>, identifier>(src);
612+
return sequence<exactly<'%'>, identifier_alnums >(src);
613613
}
614614
// Match CSS numeric constants.
615615

0 commit comments

Comments
 (0)