cloudhead/less.js — Issue #687: TypeError: Object #<Object> has no method 'operate' when using semi-colon
Author: mindfullsilence
Created: 2012-03-07 09:57:09+00:00
State: open

I have a less file with a few variable declarations. One of them is a fairly long calculation. The problem area of my file looks like this:

@column-width	:	@base * 6em;	//	Width of column	*/
@gutter-width	:	2em;	//	Width of column spacing	*/
@columns	:	12;	//	Number of Columns	*/
@gridsystem-width	:	(@column-width *	//	For calculating the total	*/
@columns) + (	//	width of the content area.	*/
@gutter-width *	//	We strongly recommend you	*/
@columns)	//	do not change this formula.	*/
@total-width	:	@gridsystem-width;	//	set to 100% for fluid grid	*/

I essentially have my code set up to look like a table. The important line to note is the second to last. Notice before the single-line comment, but after the perenthesis there is no semi-colon. Less compiles this just fine, even though there is a new variable following it. On the other hand - where I think there might be a bug - when I add the semi-colon to the end of the second-to-last line, LESS throws an error

So line 4 - 7 end up looking like this with the semi-colon at the end:

@gridsystem-width	:	(@column-width *	//	For calculating the total	*/
@columns) + (	//	width of the content area.	*/
@gutter-width *	//	We strongly recommend you	*/
@columns);	//	do not change this formula.	*/

And an error is thrown by LESS:

TypeError: Object #