diff --git a/src/css/PropertyValuePart.js b/src/css/PropertyValuePart.js index 55148d0a..cf909779 100644 --- a/src/css/PropertyValuePart.js +++ b/src/css/PropertyValuePart.js @@ -149,7 +149,7 @@ function PropertyValuePart(text, line, col){ } else if (/^[\,\/]$/.test(text)){ this.type = "operator"; this.value = text; - } else if (/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)){ + } else if (/^[a-z\-_\u0080-\uFFFF][a-z0-9\-_\u0080-\uFFFF]*$/i.test(text)){ this.type = "identifier"; this.value = text; } diff --git a/tests/css/Validation.js b/tests/css/Validation.js index 81e34ad4..1f051bef 100644 --- a/tests/css/Validation.js +++ b/tests/css/Validation.js @@ -69,7 +69,8 @@ "foo", "foo, bar", "none, none", - "none, foo" + "none, foo", + "has_underscore" ], invalid: {