W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2008

2002/css-validator/org/w3c/css/parser/analyzer CssParser.java,1.32,1.33

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 13 Mar 2008 16:54:42 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1JZqhW-0007Ev-Ef@lionel-hutz.w3.org>

Update of /sources/public/2002/css-validator/org/w3c/css/parser/analyzer
In directory hutz:/tmp/cvs-serv27763

Modified Files:
	CssParser.java 
Log Message:
fix for http://www.w3.org/Bugs/Public/show_bug.cgi?id=3634

Index: CssParser.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- CssParser.java	13 Mar 2008 16:21:18 -0000	1.32
+++ CssParser.java	13 Mar 2008 16:54:40 -0000	1.33
@@ -266,18 +266,18 @@
                           char operator, Token n, int token)
         throws ParseException {
         if (n != null) {
-
             if (ac.getCssVersion().equals("css1") &&
                 (n.image).equals("inherit")) {
                 incompatible_error = true;
             }
+            String val = (operator == ' ') ? n.image : operator+n.image;
 
             if (n.kind == CssParserConstants.IDENT) {
-                v.set( convertIdent(operator+n.image).trim(), ac);
+                v.set(convertIdent(val), ac);
             } else if (n.kind == CssParserConstants.STRING) {
-                v.set((operator+n.image).trim(), ac);
+                v.set(val, ac);
             } else {
-                v.set((operator+n.image).trim(), ac);
+                v.set(val, ac);
             }
         }
         expr.addValue(v);
Received on Thursday, 13 March 2008 16:55:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:00 GMT