From 8f7d9131676078ccad731f170a4bd0c888e89268 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Thu, 3 Aug 2023 11:48:25 +0900 Subject: [PATCH] fix(afterfact): fixed key extract condition to exclude string included newline character from key #1145 --- src/afterfact.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afterfact.rs b/src/afterfact.rs index c41bd2be7..bd6a97846 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -1465,7 +1465,7 @@ pub fn output_json_str( let first_character = char::from_str(&sp.chars().next().unwrap_or('-').to_string()) .unwrap_or_default(); - if !sp.contains(['\\', '"', '\r', '\n']) + if !sp.contains(['\\', '"', '🛂']) && first_character.is_uppercase() && !sp.starts_with(['-', '/']) && sp.ends_with(':')