TWiki fixed topic link if you include a topic from one web into another web. This is done to prevent broken links.
Example:
Web1 has TopicOne with this content:
Links: TopicA, TopicB
Now create TopicTwo in Web2 and include this:
%INCLUD{Web1.TopicOne}%
The result of the include should result in:
Links: Web1.TopicA, Web1.TopicB
But there is a bug, it returns:
Links: TopicA, Web1.TopicB
Bug: The first link is not prefixed with the web name.
Fix: Use more relaxed termination test for WikiWord link. TWiki auto-links
WikiWord links if prefixed with whitespace or parenthesis, and with any text following the WikiWord. The include fix is more strict, it expects WikiWords to be terminated by whitespace or |.
Patch:
--- TWiki.pm (revision 20025)
+++ TWiki.pm (working copy)
@@ -2058,7 +2058,7 @@
unless( $options->{in_noautolink} ) {
# 'TopicName' to 'Web.TopicName'
- $text =~ s#(?:^|(?<=[\s(]))($regex{wikiWordRegex})(?=\s|\)|$)#$fromWeb.$1#go;
+ $text =~ s#(?:^|(?<=[\s(]))($regex{wikiWordRegex})#$fromWeb.$1#go;
}
# Handle explicit [[]] everywhere
--
TWiki:Main/PeterThoeny
- 2011-01-12