diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/assets.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/assets.rs index b83ce6315..2ba1c5913 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/assets.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/assets.rs @@ -9,9 +9,10 @@ pub(super) fn font_face_rule( } pub(super) fn html_comment(label: &str, value: serde_json::Value) -> Markup { - let text = serde_json::to_string_pretty(&value) - .unwrap_or_else(|_| "{}".to_string()) - .replace("--", "- -"); + let mut text = serde_json::to_string_pretty(&value).unwrap_or_else(|_| "{}".to_string()); + while text.contains("--") { + text = text.replace("--", "- -"); + } PreEscaped(format!("")) }