-
-
Notifications
You must be signed in to change notification settings - Fork 39
Error thrown on single-line mixin include without semicolon #110
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
Comments
Excuse me, is there any fix progress about this issue? |
@zhangzhiqiang37 github will show activity above if there is any. as of 20 days ago, there is no activity. |
Well the semicolon is just a false flag on this one. A semicolon short-circuits the parsing and returns the proper rule. But the real issue here is that there's a combination of parens and a string param there that seems to be throwing the parsing off. I've spent 4 hours and tried a half dozen different ways to resolve this and nothing will satisfy all scenarios. One fix results in other breakages. If anyone wants this fixed, it's going to have to come from an outside contributor. 4 hours is my max. |
So I ended up rewriting the entire parser on PostCSS v7. 00995e5 adds a test to assert that this doesn't throw an error any longer. |
* chore: fix linting errors * chore: de-esm * chore: de-esm, start move to ava * chore: move to circle * chore: gulp to npm scripts, housekeeping * chore: unfuck prev de-esm * test: get root tests passing * test: better integration tests * test: finish ava migration * chore: clean up package, add code coverage * chore(ci): fix lint script * test: ignore postcss-parser-tests until after 7.x update * chore(ci): add node 6 to circle config * fix: fixes #88, malformed filenames and missing semicolons in imports * fix: fixes #89, case insensitive !important * chore: keep the old parsers around for reference temporarily * refactor: leverage postcss 7.0 * refactor: enable mixins * chore: improve linting, fix variable parse, enable sanity check tests * chore: get stringifying working * chore: re-implement stringifying, update tests, remove old /lib * test: add test for #110 * test: add test for #108 * chore: implement interpolation, update tests * fix: fixes #102 and #86 * chore: code cleanup
So... I will see this new feature in next version of lesshint? @jwilsson |
@zhangzhiqiang37 Yes, eventually. There are still some things to work out with this upgrade. |
Originally reported at lesshint/lesshint#490
10.9.0
6.2.0
2.0.0
If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.
LESS
JavaScript
Errors
Expected Behavior
Return an AST without any errors.
Actual Behavior
The above error is thrown. Adding a semicolon before
}
fixes it though.How can we reproduce the behavior?
Run the JS code above.
The text was updated successfully, but these errors were encountered: