diff --git a/crates/mdbook-html/src/html/tree.rs b/crates/mdbook-html/src/html/tree.rs index 5cb97ce378..6dc480a797 100644 --- a/crates/mdbook-html/src/html/tree.rs +++ b/crates/mdbook-html/src/html/tree.rs @@ -392,10 +392,11 @@ where el } Tag::BlockQuote(kind) => { - let mut b = Element::new("blockquote"); if let Some(kind) = kind { let (class_kind, icon, text) = super::admonitions::select_tag(kind); let class = format!("blockquote-tag blockquote-tag-{class_kind}"); + let mut b = Element::new("div"); + b.insert_attr("role", "note".into()); b.insert_attr("class", class.into()); self.push(Node::Element(b)); @@ -416,7 +417,7 @@ where self.pop(); return; } - b + Element::new("blockquote") } Tag::CodeBlock(kind) => { let mut code = Element::new("code"); diff --git a/tests/testsuite/markdown/admonitions/expected/admonitions.html b/tests/testsuite/markdown/admonitions/expected/admonitions.html index 962e7d7992..50ce607f87 100644 --- a/tests/testsuite/markdown/admonitions/expected/admonitions.html +++ b/tests/testsuite/markdown/admonitions/expected/admonitions.html @@ -1,34 +1,34 @@

Admonitions

-
+

Note

This is a note.

There are multiple paragraphs.

-
-
+ +

Tip

This is a tip.

-
-
+ +

Important

This is important.

-
-
+ +

Warning

This is a warning.

-
-
+ +

Caution

This is a caution.

-
+

[!UNKNOWN] This is an unknown tag.

-
+

Important

This is an important admonition.

-
+

Note

This nested note should have its own color.

-
-
\ No newline at end of file + + \ No newline at end of file