From e1c354916a77c3a5668996cd778ed1ff54596a44 Mon Sep 17 00:00:00 2001 From: Remco Smits Date: Mon, 25 Aug 2025 03:28:26 +0200 Subject: [PATCH] markdown: Fix that style attribute values are extracted correctly from img element (#1171) This PR fixes an issue with parsing the styles attribute values. The main issue it fixes is that we tried splitting on `:` twice which we should only do once. Before this change see the following variable values: decl="width: 10px" rule=["width", "10px"] (each iteration one value) And for each rule value we tried splitting again on `:` which is wrong we should only do this once. --- crates/ui/src/text/html.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/ui/src/text/html.rs b/crates/ui/src/text/html.rs index 8f581afb..20091427 100644 --- a/crates/ui/src/text/html.rs +++ b/crates/ui/src/text/html.rs @@ -242,14 +242,12 @@ fn style_attrs(attrs: &RefCell>) -> HashMap