diff --git a/packages/less/src/less/parser/parser.js b/packages/less/src/less/parser/parser.js index 139e954af..97840fa9d 100644 --- a/packages/less/src/less/parser/parser.js +++ b/packages/less/src/less/parser/parser.js @@ -2416,7 +2416,7 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) { do { e = this.comment(); - if (e) { + if (e && !e.isLineComment) { entities.push(e); continue; } diff --git a/packages/test-data/css/_main/variables.css b/packages/test-data/css/_main/variables.css index ffa374106..73e271403 100644 --- a/packages/test-data/css/_main/variables.css +++ b/packages/test-data/css/_main/variables.css @@ -77,3 +77,18 @@ --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; } +div#apple { + color: blue; +} +div#banana { + color: blue; +} +div#cherry { + color: blue; +} +div#carrot { + color: blue; +} +div#potato { + color: blue; +} diff --git a/packages/test-data/less/_main/variables.less b/packages/test-data/less/_main/variables.less index 4f3a7a324..cb51b69ef 100644 --- a/packages/test-data/less/_main/variables.less +++ b/packages/test-data/less/_main/variables.less @@ -132,3 +132,19 @@ --tw-pinch-zoom: ; --tw-scroll-snap-strictness: proximity; } + +@items: +// Fruit + apple, + banana, + cherry, +// Vegetables + carrot, + potato, +; + +each(@items, { + div#@{value} { + color: blue; + } +})