allow for operations with no spaces, such as '4+5'

This commit is contained in:
cloudhead 2010-03-19 18:46:42 -04:00
parent ef61aec5f1
commit 10965a9034

View File

@ -782,7 +782,8 @@ less.parser = {
addition: function () { addition: function () {
var m, a, op; var m, a, op;
if (m = $(this.multiplication)) { if (m = $(this.multiplication)) {
if ((op = $(/[-+]\s+/g)) && (a = $(this.addition))) { if ((op = $(/[-+]\s+/g) || (input[i - 1] != ' ' && $(/[-+]/g))) &&
(a = $(this.addition))) {
return new(tree.Operation)(op, [m, a]); return new(tree.Operation)(op, [m, a]);
} else { } else {
return m; return m;