Skip to content

Commit ab8f24b

Browse files
committed
Auto merge of #3880 - MicroJoe:align-image-tests, r=Turbo87
render: fix center image test The image test is actually not representative and will not center the image. This fix helps users discover how to center images and proves that they will be centered on crates.io. Note: I am the original author of this testcase from PR #3862
2 parents 77507c9 + 34191ae commit ab8f24b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/render.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,11 @@ mod tests {
534534
#[test]
535535
fn image_alignment() {
536536
let text =
537-
"<img src=\"https://img.shields.io/crates/v/clap.svg\" alt=\"\" align=\"center\">\n";
537+
"<p align=\"center\"><img src=\"https://img.shields.io/crates/v/clap.svg\" alt=\"\"></p>\n";
538538
let result = markdown_to_html(text, None);
539539
assert_eq!(
540540
result,
541-
"<img src=\"https://img.shields.io/crates/v/clap.svg\" alt=\"\" align=\"center\">\n"
541+
"<p align=\"center\"><img src=\"https://img.shields.io/crates/v/clap.svg\" alt=\"\"></p>\n"
542542
);
543543
}
544544
}

0 commit comments

Comments
 (0)