diff --git a/src/parser/mod.rs b/src/parser/mod.rs index bddd69f5..5bf26c20 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -2130,7 +2130,7 @@ impl<'a, 'o, 'c> Parser<'a, 'o, 'c> { } } } - NodeValue::Link(..) | NodeValue::Image(..) => { + NodeValue::Link(..) | NodeValue::Image(..) | NodeValue::WikiLink(..) => { this_bracket = true; break; } diff --git a/src/tests/wikilinks.rs b/src/tests/wikilinks.rs index 6b0c94c3..19b14445 100644 --- a/src/tests/wikilinks.rs +++ b/src/tests/wikilinks.rs @@ -167,6 +167,25 @@ fn wikilinks_exceeds_label_limit() { ); } +#[test] +fn wikilinks_autolinker_ignored() { + html_opts!( + [extension.wikilinks_title_after_pipe, extension.autolink], + concat!("[[http://example.com]]",), + concat!( + "

http://example.com

\n" + ), + ); + + html_opts!( + [extension.wikilinks_title_before_pipe, extension.autolink], + concat!("[[http://example.com]]",), + concat!( + "

http://example.com

\n" + ), + ); +} + #[test] fn sourcepos() { assert_ast_match!(