test(markdown): remove diagnostic marker, keep slash verification test
移除 data-pipeline-v2 诊断标记(已完成使命:确认新二进制含新代码)。 保留 full_pipeline_wrap_then_clean_preserves_slash 测试,它验证完整 渲染管线(wrap → clean_html)的斜杠格式不被 sanitizer 破坏。 根因记录: 文章正文 HTML 存在 posts.content_html 字段,创建/更新时 渲染一次存入 DB,展示时直接读 DB 不重新渲染。blur-up 的 markdown 改动只对新渲染生效,存量文章需重新保存或 rebuild_content_html 触发重渲染。
This commit is contained in:
parent
ad0d884065
commit
9c2b0b1a66
@ -375,6 +375,18 @@ mod tests {
|
|||||||
assert!(result.contains(" / "), "aspect-ratio must use slash separator, got: {}", result);
|
assert!(result.contains(" / "), "aspect-ratio must use slash separator, got: {}", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn full_pipeline_wrap_then_clean_preserves_slash() {
|
||||||
|
// 模拟完整渲染管线:wrap_images_with_blur → clean_html
|
||||||
|
// 验证 sanitizer 不把斜杠转义或删掉
|
||||||
|
let html = r#"<img src="/uploads/2026/06/18/090402.21c4f0b6-6d5a-49ee-bc79-99cb557ff385.webp" alt="t">"#;
|
||||||
|
let wrapped = wrap_images_with_blur(html);
|
||||||
|
let cleaned = clean_html(&wrapped);
|
||||||
|
println!("WRAPPED: {}", wrapped);
|
||||||
|
println!("CLEANED: {}", cleaned);
|
||||||
|
assert!(cleaned.contains(" / "), "clean_html must preserve slash in --ar, got: {}", cleaned);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn slugify_heading_simple() {
|
fn slugify_heading_simple() {
|
||||||
assert_eq!(slugify_heading("Hello World"), "hello-world");
|
assert_eq!(slugify_heading("Hello World"), "hello-world");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user