Skip to content

Commit 8c80e91

Browse files
committed
fix: 修复font-family处理.的转义
1 parent 5b277fb commit 8c80e91

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/parse_style_properties.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,11 @@ pub fn parse_style_properties(properties: &Vec<(String, Property)>) -> DeclsAndV
271271
"fontFamily" => {
272272
final_properties.push(StyleValueType::Expr(Expr::new(
273273
CSSPropertyType::FontFamily,
274-
generate_expr_lit_str!(value.value_to_css_string(PrinterOptions::default()).unwrap()),
274+
{
275+
let result = value.value_to_css_string(PrinterOptions::default()).unwrap();
276+
let final_str = result.replace(r"\.", ".");
277+
generate_expr_lit_str!(final_str)
278+
}
275279
)));
276280
}
277281
"lineHeight" => {

0 commit comments

Comments
 (0)