-
Notifications
You must be signed in to change notification settings - Fork 71
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
fix: logical attribute calc css variable logic error #177
Conversation
这里加个空格应该就可以 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #177 +/- ##
==========================================
- Coverage 94.80% 94.80% -0.01%
==========================================
Files 29 29
Lines 2619 2618 -1
Branches 394 393 -1
==========================================
- Hits 2483 2482 -1
Misses 136 136 ☔ View full report in Codecov by Sentry. |
temp = ''; | ||
} else if (brackets > 0) { | ||
temp += item; | ||
temp += ` ${item}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥不都用数组push, 然后最终join(' ')
呢?字符串玩着玩着容易玩出这种问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉这段代码已经比较精简了,没有可操作空间了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let temp: string[] = [];
let brackets = 0;
return [
splitStyle.reduce<string[]>((list, item) => {
if (item.includes('(') || item.includes(')')) {
const left = item.split('(').length - 1;
const right = item.split(')').length - 1;
brackets += left - right;
}
if (brackets >= 0) {
temp.push(item);
}
if (brackets === 0) {
list.push(temp.join(' '));
temp = [];
}
return list;
}, []),
!!importantCells,
];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yoyo837 可以直接用 suggestion 能力。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
跨越很多行,还涉及一些未修改的行,这种情况我不会 suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push 了,再 review 一下吧
Co-authored-by: yoyo837 <[email protected]>
fix: ant-design/ant-design#47652
fix: ant-design/ant-design#47707