From e33d0b9b7919c989aa3555bdc010cd0bfc02dd7c Mon Sep 17 00:00:00 2001 From: Luke Page Date: Sun, 24 Aug 2014 22:43:11 +0100 Subject: [PATCH] Fix missing ^, causing parse error. Fixes #2154 --- lib/less/parser.js | 2 +- test/css/comments.css | 3 +++ test/less/comments.less | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/less/parser.js b/lib/less/parser.js index 0c925d17..6bfa5f29 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -1413,7 +1413,7 @@ less.Parser = function Parser(env) { if (c === '/') { save(); - var slashedCombinator = $re(/\/[a-z]+\//i); + var slashedCombinator = $re(/^\/[a-z]+\//i); if (slashedCombinator) { forget(); return new(tree.Combinator)(slashedCombinator); diff --git a/test/css/comments.css b/test/css/comments.css index b85f5b4f..58b78ea1 100644 --- a/test/css/comments.css +++ b/test/css/comments.css @@ -55,6 +55,9 @@ .test { color: 1px; } +.sr-only-focusable { + clip: auto; +} #last { color: #0000ff; } diff --git a/test/less/comments.less b/test/less/comments.less index 7859911e..3e5578b6 100644 --- a/test/less/comments.less +++ b/test/less/comments.less @@ -77,6 +77,13 @@ } .mixin_def_with_colors(); +// .s when +//R/2 + +.sr-only-focusable { + clip: auto; +} + #last { color: blue } //