Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 02013b4

Browse files
committed
fix: 修复纯数字解析负数异常
1 parent ea425a2 commit 02013b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/style_propetries/unit.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub fn generate_expr_with_css_input(input: String, platform: Platform) -> Expr {
168168
if let Ok(caps) = re.captures(bytes) {
169169
if let Some(caps) = caps {
170170
// 提取匹配到的数字部分
171-
let input_str = std::str::from_utf8(&caps["num"]);
171+
let input_str = std::str::from_utf8(&caps[0]);
172172
let unit = match std::str::from_utf8(&caps["unit"]) {
173173
Ok(s) => s,
174174
Err(_) => "vp",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /