-is(IkiWiki::htmlize("foo", "foo", "mdwn",
- "C. S. Lewis wrote books\n"),
- "<p>C. S. Lewis wrote books</p>\n", "alphalist off by default");
+foreach my $multimarkdown (qw(1 0)) {
+ $config{multimarkdown} = $multimarkdown;
+ undef $IkiWiki::Plugin::mdwn::markdown_sub
+ if defined $IkiWiki::Plugin::mdwn::markdown_sub;
+ IkiWiki::loadplugins();
+ IkiWiki::checkconfig();
+
+ is(IkiWiki::htmlize("foo", "foo", "mdwn",
+ "C. S. Lewis wrote books\n"),
+ "<p>C. S. Lewis wrote books</p>\n",
+ "alphalist off by default for multimarkdown = $multimarkdown");
+
+ like(IkiWiki::htmlize("foo", "foo", "mdwn",
+ "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
+ qr{<p>This works.*fnref:1.*},
+ "footnotes on by default for multimarkdown = $multimarkdown");
+
+ $config{mdwn_footnotes} = 0;
+ unlike(IkiWiki::htmlize("foo", "foo", "mdwn",
+ "An unusual link label: [^1]\n\n[^1]: http://example.com/\n"),
+ qr{<p>An unusual link label: .*fnref:1.*},
+ "footnotes can be disabled for multimarkdown = $multimarkdown");
+
+ $config{mdwn_footnotes} = 1;
+ like(IkiWiki::htmlize("foo", "foo", "mdwn",
+ "This works[^1]\n\n[^1]: Sometimes it doesn't.\n"),
+ qr{<p>This works.*fnref:1.*},
+ "footnotes can be enabled for multimarkdown = $multimarkdown");
+}