#!perl use strict; use warnings; use Test::More tests => 2; use Text::WikiFormat; my $wikitext = < [ '[[', ']]' ] ); my $htmltext = Text::WikiFormat::format( $wikitext, \%tags, { extended => 1 } ); is( $htmltext, '

Desc of the '. qq|Link

\n|, '...processing all embedded links' ); TODO: { # Art Henry's bug; but not sure it's really a bug local $TODO = "Unsupported MediaWiki features."; $tags{link} = \&link_handler; # Or with the link handler overridden. $htmltext = Text::WikiFormat::format( $wikitext, \%tags, { extended => 1 } ); is( $htmltext, 'Desc of the Link', '...and also work with a handler override.' ); } sub link_handler { my ( $link, $opts ) = @_; ( $link, my $title ) = split( /\|/, $link, 2 ); return $title; }