Skip to content

Commit a26f1a0

Browse files
committed
BigDecimal parsing was choking on leading space, when no operator was set.
now using properly formatted string, fixing #342
1 parent 0467c2a commit a26f1a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

org/w3c/css/parser/analyzer/CssParser.jj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,11 @@ CssANPlusB anplusb() :
19531953
}
19541954
// +/-num (so no N)
19551955
| LOOKAHEAD(2) ( ( op=unaryOperator() )? b=<NUMBER> ) {
1956-
anpb.set(""+op+b.image, ac);
1956+
if (op == ' ') {
1957+
anpb.set(b.image, ac);
1958+
} else {
1959+
anpb.set(""+op+b.image, ac);
1960+
}
19571961
return anpb;
19581962
}
19591963
// generic aN+b including aN and N+b where N is mandatory

0 commit comments

Comments
 (0)