Tags:
create new tag
, view all tags

Bug: WikiSyntax makeup disables WikiWords autolinking

Typing something like this _WikiWord_ does not result in WikiWord.
Neither *WordWord*, nor __WordWord__ ...

Test case

Insert _SomethingLikeThis_ and see on result.

Environment

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, SpreadSheetPlugin, CommentPlugin, EditTablePlugin, InterwikiPlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, TablePlugin
Server OS: Linux 2.4.26
Web server: Apache 1.3.31
Perl version: 5.8.4
Client OS: Win2k sp4
Web Browser: Mozilla 1.7.2

-- VladimirPodryvanov - 16 Sep 2004

Follow up

This happens because ([\s\(])($regex{wikiWordRegex}) regex on line 1092 in TWiki/Render.pm cannot recognize makeuped WikiWord

1091    # 'TopicName' link:
1092    s/([\s\(])($regex{wikiWordRegex})/&internalLink($1,$theWeb,$2,$2,"",1)/geo;

To solve this I added additional " ", space symbol, before $2 in lines 1044-1046.

1041    # Emphasizing
...
1044    s/([\s\(])__([^\s]+?|[^\s].*?[^\s])__([\s\,\.\;\:\!\?\)])/$1<strong><em> $2<\/em><\/s
1045    s/([\s\(])\*([^\s]+?|[^\s].*?[^\s])\*([\s\,\.\;\:\!\?\)])/$1<strong> $2<\/strong>$3/g
1046    s/([\s\(])_([^\s]+?|[^\s].*?[^\s])_([\s\,\.\;\:\!\?\)])/$1<em> $2<\/em>$3/g;

-- VladimirPodryvanov - 16 Sep 2004

This is spec, autolinks are only done if WikiWords are preceeded by white space or parenthesis. This reduces the likelihood of false links. If you need links with markup write for example *[[WebNotify]]* to get a bold WebNotify link. We would break existing content if we change the link rule.

See also TextFormattingRules documentation.

-- PeterThoeny - 17 Sep 2004

Fix record

Topic revision: r3 - 2004-09-17 - SamHasler
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.