Skip to content

Commit 3079a6b

Browse files
committed
rustfmt per travis
1 parent 0cd6a3a commit 3079a6b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/render.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ impl<'a> MarkdownRenderer<'a> {
9494
.cloned()
9595
.collect();
9696
let mut html_sanitizer = Builder::new();
97-
html_sanitizer.link_rel(Some("nofollow noopener noreferrer"))
97+
html_sanitizer
98+
.link_rel(Some("nofollow noopener noreferrer"))
9899
.tags(tags)
99100
.tag_attributes(tag_attributes)
100101
.allowed_classes(allowed_classes)
@@ -221,13 +222,19 @@ mod tests {
221222
fn header_has_tags() {
222223
let text = "# My crate\n\nHello, world!\n";
223224
let result = markdown_to_html(text).unwrap();
224-
assert_eq!(result, "<h1><a href=\"#my-crate\" id=\"user-content-my-crate\" rel=\"nofollow noopener noreferrer\"></a>My crate</h1>\n<p>Hello, world!</p>\n");
225+
assert_eq!(
226+
result,
227+
"<h1><a href=\"#my-crate\" id=\"user-content-my-crate\" rel=\"nofollow noopener noreferrer\"></a>My crate</h1>\n<p>Hello, world!</p>\n"
228+
);
225229
}
226230

227231
#[test]
228232
fn manual_anchor_is_sanitized() {
229233
let text = "<h1><a href=\"#my-crate\" id=\"my-crate\"></a>My crate</h1>\n<p>Hello, world!</p>\n";
230234
let result = markdown_to_html(text).unwrap();
231-
assert_eq!(result, "<h1><a href=\"#my-crate\" id=\"user-content-my-crate\" rel=\"nofollow noopener noreferrer\"></a>My crate</h1>\n<p>Hello, world!</p>\n");
235+
assert_eq!(
236+
result,
237+
"<h1><a href=\"#my-crate\" id=\"user-content-my-crate\" rel=\"nofollow noopener noreferrer\"></a>My crate</h1>\n<p>Hello, world!</p>\n"
238+
);
232239
}
233240
}

0 commit comments

Comments
 (0)