#!perl use strict; use warnings; use Test::More tests => 4; use Text::WikiFormat; my $wikitext = <<'WIKI'; I download code from http://www.cpan.org/ or ftp://ftp.cpan.org/ and email mailto:chromatic@example.com WIKI my $htmltext = Text::WikiFormat::format( $wikitext, {}, { extended => 1, absolute_links => 1 } ); is( $htmltext, qq|
I download code from http://www.cpan.org/ | .
qq|or ftp://ftp.cpan.org/ and
| . "\n" .
q|email mailto:chromatic@example.com
I download code from http://www.cpan.org/ or ftp://ftp.cpan.org/ and
| . "\n" .
q|email mailto:chromatic@example.com
this is a moose:notalink
\n|, q|Doesn't pick up things that might look like links| ); $htmltext = Text::WikiFormat::format( $wikitext, {schemas => ['moose']}, { extended => 1, absolute_links => 1 } ); is( $htmltext, qq|this is a moose:notalink
\n|, q|Schema tag allows specifying what is a link| );