diff --git a/crates/crates_io_markdown/lib.rs b/crates/crates_io_markdown/lib.rs index 6a204a71a2d..b3ec061d0c1 100644 --- a/crates/crates_io_markdown/lib.rs +++ b/crates/crates_io_markdown/lib.rs @@ -77,7 +77,9 @@ impl<'a> MarkdownRenderer<'a> { .build(); let extension_options = ComrakExtensionOptions::builder() + .alerts(true) .autolink(true) + .multiline_block_quotes(true) .strikethrough(true) .table(true) .tagfilter(true) @@ -670,4 +672,30 @@ There can also be some text in between! "#); } + + #[test] + fn markdown_alerts() { + let text = "> [!note]\n> Something of note"; + assert_snapshot!(markdown_to_html(text, None, ""), @r#" +
+

Note

+

Something of note

+
+ "#); + } + + #[test] + fn markdown_multiline_block_quotes_complex() { + let text = "Paragraph one\n\n>>>\nParagraph two\n\n- one\n- two\n>>>"; + assert_snapshot!(markdown_to_html(text, None, ""), @r#" +

Paragraph one

+
+

Paragraph two

+ +
+ "#); + } } diff --git a/tests/acceptance/readme-rendering-test.js b/tests/acceptance/readme-rendering-test.js index db6d8cb48ce..fdaf191415b 100644 --- a/tests/acceptance/readme-rendering-test.js +++ b/tests/acceptance/readme-rendering-test.js @@ -66,6 +66,22 @@ graph TD; C-->D; +

GitHub Style Alert

+
+

Note

+

Something of note

+
+ +

GitLab Style Multiline Block Quotes

+

Paragraph one

+
+

Paragraph two

+ +
+