Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selector interpolation breaks chunk and results in "Unrecognized input" #1833

Closed
kasparsz opened this issue Jan 27, 2014 · 1 comment
Closed

Comments

@kasparsz
Copy link

When less is divided into chunks in parser.js, "}" symbols can end chunk, but it doesn't take into account selector interpolation, so chunk can end right after selector "@{selector}", before opening "{".

Test:

@selector: "div";

/*
whole comment is in a single chunk, so chunk will be "closed" as soon as possible
blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank
blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank
blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank
blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank
blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank blank
*/
@{selector} {
  color: red;
}

Result:
Unrecognized input

Reproducible in 1.6.0 and .1.6.1, before that was working as expected.

@lukeapage
Copy link
Member

thanks for the report. It wasn't quite what you suggested but I fixed it and added a test to stop regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants