diff --git a/src/api/markdown.rs b/src/api/markdown.rs index 9107ab9..9aeddce 100644 --- a/src/api/markdown.rs +++ b/src/api/markdown.rs @@ -364,6 +364,17 @@ mod tests { assert!(!result.contains("blur-img"), "external image should not be wrapped"); } + #[test] + fn wrap_images_with_blur_uses_slash_in_aspect_ratio() { + // 用真实存在的 uploads 文件,让 dimensions 成功返回,验证 --ar 格式 + let html = r#"t"#; + let result = wrap_images_with_blur(html); + println!("ACTUAL OUTPUT: {}", result); + // aspect-ratio 必须用斜杠分隔,如 "--ar:800 / 600;" + assert!(result.contains("--ar:"), "should have --ar"); + assert!(result.contains(" / "), "aspect-ratio must use slash separator, got: {}", result); + } + #[test] fn slugify_heading_simple() { assert_eq!(slugify_heading("Hello World"), "hello-world");