Skip to content

Commit ff9e6f7

Browse files
authored
test various markdown elements after checkboxes (#10913)
The test are currently failing, which indicates a bug. As per this URLO thread: https://users.rust-lang.org/t/missing-list-item-names-in-the-readme-on-crates-io/127558 You can see the bug live in action at https://crates.io/crates/Yoda/0.11.5
1 parent d40d282 commit ff9e6f7

File tree

1 file changed

+16
-0
lines changed
  • crates/crates_io_markdown

1 file changed

+16
-0
lines changed

crates/crates_io_markdown/lib.rs

+16
Original file line numberDiff line numberDiff line change
@@ -670,4 +670,20 @@ There can also be some text in between!
670670
</picture>
671671
"#);
672672
}
673+
674+
#[test]
675+
fn nested_checkbox_lists() {
676+
let text = r#"
677+
- [ ] `c`
678+
- [ ] [link](https://crates.io)
679+
- [ ] [link](#anchor)
680+
"#;
681+
assert_snapshot!(markdown_to_html(text, None, ""), @r##"
682+
<ul>
683+
<li><input type="checkbox" disabled=""> <code>c</code></li>
684+
<li><input type="checkbox" disabled=""> <a href="https://crates.io" rel="nofollow noopener noreferrer">link</a></li>
685+
<li><input type="checkbox" disabled=""> <a href="#anchor" rel="nofollow noopener noreferrer">link</a></li>
686+
</ul>
687+
"##);
688+
}
673689
}

0 commit comments

Comments
 (0)