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 4bbc382300
commit 38ffbb40ac

View File

@@ -782,7 +782,8 @@ less.parser = {
addition: function () {
var m, a, op;
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]);
} else {
return m;