Skip to content

Commit 0304408

Browse files
committed
Check that wikilinks supercedes relaxed_autolinks
1 parent d90ad9d commit 0304408

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/tests/wikilinks.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,31 @@ fn wikilinks_sanitizes_the_href_attribute_case_2() {
4848
);
4949
}
5050

51+
#[test]
52+
fn wikilinks_supercedes_relaxed_autolinks() {
53+
html_opts!(
54+
[
55+
extension.wikilinks_title_after_pipe,
56+
parse.relaxed_autolinks,
57+
],
58+
concat!("[[http://example.com]]",),
59+
concat!(
60+
"<p><a href=\"http://example.com\" data-wikilink=\"true\">http://example.com</a></p>\n"
61+
),
62+
);
63+
64+
html_opts!(
65+
[
66+
extension.wikilinks_title_before_pipe,
67+
parse.relaxed_autolinks,
68+
],
69+
concat!("[[http://example.com]]",),
70+
concat!(
71+
"<p><a href=\"http://example.com\" data-wikilink=\"true\">http://example.com</a></p>\n"
72+
),
73+
);
74+
}
75+
5176
#[test]
5277
fn sourcepos() {
5378
assert_ast_match!(

0 commit comments

Comments
 (0)