Open BunnyMelody opened 6 years ago
Possibly the same issue as #593
Possibly the same issue as #593
How can I fix this?
Hi @BunnyMelody!
Are you on running into this issue on Windows too. Does it look similar to #593 for you?
If so I can see about fixing that : )
Hi @BunnyMelody!
Are you on running into this issue on Windows too. Does it look similar to #593 for you?
If so I can see about fixing that : )
Yes, I think it looks similar to #593
@BunnyMelody Okay! I'll work on a patch for the weekend.
@BunnyMelody Okay! I'll work on a patch for the weekend.
@jdalton Thanks a lot !
@BunnyMelody You can follow the PR at #606.
@BunnyMelody You can follow the PR at #606.
@jdalton Ok, thanks very much.
@BunnyMelody would you be up for creating a PR with a failing unit test that I could use against #606?
@BunnyMelody would you be up for creating a PR with a failing unit test that I could use against #606?
@jdalton I'm sorry it took me so long to reply, Would you please tell me what should I do for the unit test?
No worries! If you could create a scenario where the output is not what you intended with a more minimal config that would help. For reference of a unit test see this.
No worries! If you could create a scenario where the output is not what you intended with a more minimal config that would help. For reference of a unit test see this.
@jdalton Does the code below be able to help ? For test code:
let Test = require('../../option_test');
describe('less', function() {
it('Should indent right', function() {
let config = {
'sort-order': [
"overflow",
"padding",
"text-align"
]
};
let test = new Test(this, config);
return test.shouldBeEqual('sort-indent.less', 'sort-indent.expected.less');
});
});
For sort-indent.less
/*
* sort-indent.less
*/
.db() {
display: flex;
}
.v() {
vertical-align: middle;
}
.fx(1) {
flex: 1;
}
.sale-pro-info {
overflow: hidden;
padding: 16px;
text-align: left;
.db();
.v();
.fx(1);
}
For sort-indent.expected.less
:
/*
* sort-indent.expected.less
*/
.db() {
display: flex;
}
.v() {
vertical-align: middle;
}
.fx(1) {
flex: 1;
}
.sale-pro-info {
overflow: hidden;
padding: 16px;
text-align: left;
.db();
.v();
.fx(1);
}
Yes! Thank you @BunnyMelody!
Environment
Actual behavior
It expects that the code shoulde indent as it should be, while it didn't indent right, as you can see below
Expected behavior
Steps to reproduce
First, install plugin of csscomb on vs code editor, then create a less file in VS Code editor, then run csscomb, and then you can see the code didn't indent right, when I delete the configation of sort-order, then it can indent right but not sort. I have contacted the author of vscode-csscomb, and it's looks like a bug of CSSComb, I'd like to ask for some help to resolve this .
Config