2002/css-validator/org/w3c/css/parser/analyzer CssParser.jj,1.29,1.30

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

Modified Files:
	CssParser.jj 
Log Message:
setValue fixed to avoid trimming names when unnecessary.
Fixes bug http://www.w3.org/Bugs/Public/show_bug.cgi?id=3631


Index: CssParser.jj
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/analyzer/CssParser.jj,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- CssParser.jj	13 Mar 2008 16:07:02 -0000	1.29
+++ CssParser.jj	13 Mar 2008 16:54:01 -0000	1.30
@@ -283,18 +283,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:54:42 UTC