--- a/cssParser.js Mon Mar 15 07:30:07 2010 -0500
+++ b/cssParser.js Mon Mar 15 07:35:07 2010 -0500
@@ -1506,6 +1506,12 @@
while (true) {
if (!token.isNotNull())
break;
+ else if (token.isSymbol(";")
+ || (aAcceptPriority && token.isSymbol("!"))
+ || token.isSymbol("}")) {
+ this.ungetToken();
+ break;
+ }
else if (token.isIdent() && token.value in kFamily) {
fFamily += token.value;
break;
@@ -1521,6 +1527,7 @@
else
return "";
}
+ token = this.getToken(true, true);
}
else {
--- a/demo.xhtml Mon Mar 15 07:30:07 2010 -0500
+++ b/demo.xhtml Mon Mar 15 07:35:07 2010 -0500
@@ -7,7 +7,7 @@
@media screen,projection,print {/* comment inside a media rule */pre { background-color: #FFFFCC;
/* comment between two declarations */<a ></a>border: 2px silver solid; padding: 1em; -moz-border-radius: 11px;
-webkit-border-radius:11px}
-body { font: sans-serif; font-family: sans-serif; margin: 1em }
+body { font: "Courier New", sans-serif; font-family: sans-serif; margin: 1em }
/* comment between two style rules */
h1 { background-color: silver }
h2 { background-color: lightgrey }