Relax the matching rules for CamelCase

We have a wiki where many pages contain acronyms, but words like PageNameABC don't link in MoinMoin See MoinMoinBugs/CamelCaseIssues for prior discussion.

We may even be able to simplify the match as much as

The simplest match would be AbC.

The following regex seems to work for 1.58

 word_rule = ur'(?:(?<![%(u)s%(l)s])|^)%(parent)s(?:%(subpages)s(?:[%(u)s]+[%(l)s]+[%(u)s]))+([%(u)s%(l)s]*)

I don't think this would interfere with any English wikis, but I'm not sure about i18n

-- JamesBardin 2007-11-08 22:53:44

James, it's close, but this breaks on page links with subpages, i.e. WikiSandBox/SubPage

This is unlikely to get changed as in existing wiki content, there would be suddenly new links appearing. -- ThomasWaldmann 2007-11-09 11:31:05

Thomas, it would be nice to have this as a cfg option (relaxed CamelCase or classic CamelCase matching)

I tested a similar change on 1.6, which handles the regex a little differently, and subpages work fine. I've found that if a user put an uppercase in the middle of a word, they were probably trying to a make a link. I'd settle for a config option though, if the majority likes the current scheme, -- 146.115.42.199 2007-11-10 02:12:45


CategoryFeatureRejected

MoinMoin: FeatureRequests/RelaxedCamelCase (last edited 2008-03-18 12:14:19 by JohannesBerg)