Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions crates/crates_io_markdown/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ impl<'a> MarkdownRenderer<'a> {
let extension_options = options::Extension::builder()
.alerts(true)
.autolink(true)
.description_lists(true)
.multiline_block_quotes(true)
.strikethrough(true)
.table(true)
Expand Down Expand Up @@ -646,6 +647,19 @@ There can also be some text in between!
assert_snapshot!(markdown_to_html(text, None, ""), @r#"<table><tbody><tr><th rowspan="1" colspan="2">Target</th></tr></tbody></table>"#);
}

#[test]
fn definition_lists() {
let text = "First term\n: First definition\n\nSecond term\n: Second definition\n";
assert_snapshot!(markdown_to_html(text, None, ""), @r#"
<dl>
<dt>First term</dt>
<dd>First definition</dd>
<dt>Second term</dt>
<dd>Second definition</dd>
</dl>
"#);
}

#[test]
fn text_alignment() {
let text = "<h1 align=\"center\">foo-bar</h1>\n<h5 align=\"center\">Hello World!</h5>\n";
Expand Down