Konstrukt::Plugin::wiki::markup::link - Inline plugin to handle links
my $l = use_plugin 'wiki::markup::link'; my $rv = $l->process($tag);
This one will look for (internal and external, implicit and explicit) links and converts them into HTML-links.
You may define a list of link plugins that will handle the different link types. The first plugin that matches a link will handle it. So the list should be sorted by descending specificity.
The defaults are:
wiki/link/plugins nolink image file external wiki
Note that the wiki plugin should be the last one in the chain since it acts like a catchall plugin ans will match all explicit links.
Implicit links
CamelCase or SomePage http://foo.bar/baz !NoLink
Explicit links
Explicit links are required here [[nocamelcase]] or here [[NoSpaceAroundLink]]. [[SomePage|But with some other description]] [[http://foo.bar/baz|somthing here]]
Initialization.
This method will do the work. Will look for new links inside the text and will also check if the target of existing wiki links exists or not.
Parameters:
Will return the plugin responsible for a given link string or undef if no plugin matches.
Will only be used internally.
Parameters:
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.