From cbb432edefbda356cd55c66f6bf68affda3f1aed Mon Sep 17 00:00:00 2001 From: cloudhead Date: Thu, 1 Jul 2010 10:46:31 +0200 Subject: [PATCH] fix syntax error with semi-colons in strings --- lib/less/parser.js | 2 +- test/css/strings.css | 1 + test/less/strings.less | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/less/parser.js b/lib/less/parser.js index c017dbd2..f05b7492 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -852,7 +852,7 @@ less.Parser = function Parser(env) { if (c === '.' || c === '#' || c === '&') { return } if (name = $(this.variable) || $(this.property)) { - if ((name.charAt(0) != '@') && (match = /^([^@+\/*(;{}-]*);/.exec(chunks[j]))) { + if ((name.charAt(0) != '@') && (match = /^([^@+\/'"*(;{}-]*);/.exec(chunks[j]))) { i += match[0].length - 1; value = new(tree.Anonymous)(match[1]); } else if (name === "font") { diff --git a/test/css/strings.css b/test/css/strings.css index 61c1f2c2..b6f7745b 100644 --- a/test/css/strings.css +++ b/test/css/strings.css @@ -12,4 +12,5 @@ quotes: "'" "'"; content: '""#!&""'; empty: ''; + semi-colon: ';'; } diff --git a/test/less/strings.less b/test/less/strings.less index 61c1f2c2..b6f7745b 100644 --- a/test/less/strings.less +++ b/test/less/strings.less @@ -12,4 +12,5 @@ quotes: "'" "'"; content: '""#!&""'; empty: ''; + semi-colon: ';'; }