@@ -114,7 +114,7 @@ mod tests {
let expected = indoc! {"
## Serde
- Serde is a framework for serializing and deserializing Rust data structures efficiently and generically.
+ Serde is a framework for _**ser**_ializing and _**de**_serializing Rust data structures efficiently and generically.
The Serde ecosystem consists of data structures that know how to serialize and deserialize themselves along with data formats that know how to serialize and deserialize other things. Serde provides the layer by which these two groups interact with each other, allowing any supported data structure to be serialized and deserialized using any supported data format.
@@ -132,6 +132,25 @@ mod tests {
)
}
+ #[test]
+ fn test_styled_text() {
+ let html = indoc! {r#"
+ <p>This text is <strong>bolded</strong>.</p>
+ <p>This text is <em>italicized</em>.</p>
+ "#};
+ let expected = indoc! {"
+ This text is **bolded**.
+
+ This text is _italicized_.
+ "}
+ .trim();
+
+ assert_eq!(
+ convert_rustdoc_to_markdown(html.as_bytes()).unwrap(),
+ expected
+ )
+ }
+
#[test]
fn test_rust_code_block() {
let html = indoc! {r#"