23c23 < $debug $externalLinkMark $protocolsPattern --- > $debug $externalLinkMark $protocolsPattern $scriptUrl $pubUrl 26c26 < $VERSION = '1.001'; --- > $VERSION = '1.003'; 45c45 < $externalLinkMark = TWiki::Func::getPluginPreferencesValue( "MARK" ) || "(external link)"; --- > $externalLinkMark = TWiki::Func::expandCommonVariables(TWiki::Func::getPluginPreferencesValue( "MARK" )) || "(external link)"; 47a48,50 > $scriptUrl = TWiki::Func::getUrlHost() . TWiki::Func::getScriptUrlPath(); > $pubUrl = TWiki::Func::getUrlHost() . TWiki::Func::getPubUrlPath(); > 55,65c58,60 < sub commonTagsHandler < { < ### my ( $text, $topic, $web ) = @_; # do not uncomment, use $_[0], $_[1]... instead < < TWiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug; < < # This is the place to define customized tags and variables < # Called by TWiki::handleCommonTags, after %INCLUDE:"..."% < < # do custom extension rule, like for example: < $_[0] =~ s!\[\[($protocolsPattern://[^]]+?)\]\[[^]]+?\]\]([&]nbsp;)?! handleExternalLink($&, $1) !ge; --- > sub preRenderingHandler { > # ref in [[ref]] or [[ref][ > $_[0] =~ s!\[\[($protocolsPattern://[^]]+?)\](\[[^]]+?\]){0,1}\]([&]nbsp;)?! handleExternalLink($&, $1) !ge; 71,73d65 < my $scriptUrl = TWiki::Func::getUrlHost() . TWiki::Func::getScriptUrlPath(); < my $pubUrl = TWiki::Func::getUrlHost() . TWiki::Func::getPubUrlPath(); <