-
Notifications
You must be signed in to change notification settings - Fork 13
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
blanklineBetweenSelectors has a failing case #37
Comments
That regular expressions is flaky. To be honest I'm very tempted to remove this feature. I merged this feature in with pull request #30 without properly testing it. IMO the only reliable way of formatting code is to create a lexer/parser which is totally outside the scope of this plugin. |
Is the linter not configurable? |
It is configurable, but I'd rather make a beautifier/formatter match chosen On Thu, Feb 13, 2014 at 2:20 AM, Richard Willis notifications@github.comwrote:
|
I agree. Really this plugin only provides the flexibility of sass-convert, which is not a lot! I have been thinking about providing post-sass-convert formatting features, but I'm still undecided. Perhaps there's a solid python sass lexer out there that I can use, but saying that it doesn't seem right to do it in python land, seeing as though sass already has a lexer/parser. If I was more familiar with ruby I would explore the option of creating a custom gem that uses sass but also provides additional formatting options. |
I have decided to remove this feature entirely. |
When I run SassBeautify with blanklineBetweenSelectors set to true, the following:
becomes:
I found the regex code that deals with this
This obviously requires the code to search back previous lines of scss until it finds the first one in the list. I'll keep thinking to see if I can come up with a solution. Might be easier to do this while the file is split up by line (where you're making sure the file uses unix-style newline characters).
By the way, I ran into this while trying to use SassBeautify in conjunction with SublimeLinter-contrib-scss-lint. It has a rule for a single selector per line. I'm finding that sass-convert isn't very compatible with scss-lint.
The text was updated successfully, but these errors were encountered: