From f35bafcf8687a14c49ffca17eb073b5d89dec38a Mon Sep 17 00:00:00 2001 From: Lennart Hase <1834270+motorlatitude@users.noreply.github.com> Date: Thu, 23 Apr 2026 18:59:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Update=20hr=20tag=20replacement?= =?UTF-8?q?=20in=20Steam=20parser=20and=20format=20regex=20initialization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/patches/platforms/steam.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/plugins/patches/platforms/steam.rs b/src/plugins/patches/platforms/steam.rs index e191656..fe912d1 100644 --- a/src/plugins/patches/platforms/steam.rs +++ b/src/plugins/patches/platforms/steam.rs @@ -83,7 +83,7 @@ impl Steam { .replace("[/h2]", "\n") .replace("[h3]", "") .replace("[/h3]", "\n") - .replace("[hr]", "---\n") + .replace("[hr]", "——————\n") .replace("[/hr]", "") .replace("\\[", "["); let re = Regex::new(r"\[img](.*?)\[/img]").unwrap(); @@ -96,7 +96,8 @@ impl Steam { images.push(path.replace("{STEAM_CLAN_IMAGE}", STEAM_CLAN_IMAGE)); } let re3 = Regex::new(r"\[url=(.*?)](.*?)\[/url]").unwrap(); - let re_youtube = Regex::new(r"\[previewyoutube=(.*?)]\[/previewyoutube]").unwrap(); + let re_youtube = + Regex::new(r"\[previewyoutube=(.*?)]\[/previewyoutube]").unwrap(); // Remove img tags from content let parsed_content_1 = re.replace_all(&content, ""); let parsed_content_2 = re2.replace_all(&parsed_content_1, ""); @@ -115,10 +116,11 @@ impl Steam { if images.len() > 0 { image = &images[0]; } - let truncated_content = match parsed_trimmed_content.char_indices().nth(400) { - None => parsed_trimmed_content, - Some((idx, _)) => &parsed_trimmed_content[..idx], - }; + let truncated_content = + match parsed_trimmed_content.char_indices().nth(400) { + None => parsed_trimmed_content, + Some((idx, _)) => &parsed_trimmed_content[..idx], + }; Some(SteamNews { title: patch_notes_title,