• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item3818: Allow underscore in WikiWords

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Enhancement No Action Required   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

In many programming languages, variable names may contain letters, numbers, or _. Pleae make TWiki consider _ as a letter.

_ makes a convenient separator character, especially for those of us who find reading long phrases in CamelCase to be difficult, or who want to conveniently replace spaces wiithout simply removing them. I find _ to be especially convenient when using a template and a form to create new pages matching a particular naming convention, e.g. EngineeringDeploymentForm_XXX_YY_2007 (replace XXX and YY with today's month and day).

Yet words containing _, even if they contain a mix of upper and lower cased alphas, are considered "not a WikiWord".

I should be able to create a topic called My_Book_Report and have that be a legal WikiWord.

It would be especially nice if my_book_report was a legal WikiWord (i.e. consider _ as if it were a capital letter).

But at the very east, I'd like autolinking to work (double-bracket syntax works now) and I'd like not to have to go back and click the [ ] allow non-WikiWord box when I create a topic.

-- TWiki:Main/VickiBrown - 28 Mar 2007

When we changed the WikiWord definition so that number became lowercase letters in WikiWords we started seeing quite many new unwanted links.

I think you will find quite many cases where people have been writing normal text referring to function names etc with underscore

I would be very reluctant to agree with more WikiWord extensions.

But if you want to try it it is easy to at least change the rendering so _ is uppercase in WikiWords. Then you can see how many places that are impacted.

In TWiki.pm find the line

$regex{wikiWordRegex} = qr/[$regex{upperAlpha}]+[$regex{lowerAlphaNum}]+[$regex{upperAlpha}]+[$regex{mixedAlphaNum}]*/o;

and replace it by

$regex{wikiWordRegex} = qr/[$regex{upperAlpha}_]+[$regex{lowerAlphaNum}]+[$regex{upperAlpha}_]+[$regex{mixedAlphaNum}_]*/o;

If this is a hack you want to keep - then you also need to do some similar hacks in the javascripts for the topic creator.

But again - I do not think I want this change in the official TWiki code.

But that is my oppinion and I may be in a minority.

Under all circumstances such a dramatic spec change needs to go through the TWiki:Codev/TWikiFeature04x02 process.

-- TWiki:Main.KennethLavrsen - 28 Mar 2007

See also: TWiki:Codev.UnderscoreWikiWords.

-- TWiki:Main.ArthurClemens - 28 Mar 2007

Thanks for the link Arthur.

After having read the many difficulties this feature I even more would not want this enhancement. I fear so many ?-mark links would be showing up unwanted places and the I am not sure how my hack above will work with italics. I just gave the hack so the proposer can see how many surprising places the small ?-marks will show up in practical. Especially when many users are software engineers. In Motorola this would be a huge problem.

-- TWiki:Main.KennethLavrsen - 29 Mar 2007

Beginning to close those many enhancement proposals that do not have an agreed proposal topic in http://twiki.org/cgi-bin/view/Codev/TWikiFeature04x02 and are more than just small details.

The process to change the basic spec of TWiki or add features is described in http://twiki.org/cgi-bin/view/Codev/TWikiRelease04x01Process

-- TWiki:Main.KennethLavrsen - 23 Dec 2007

ItemTemplate
Summary Allow underscore in WikiWords
ReportedBy TWiki:Main.VickiBrown
Codebase ~twiki4
SVN Range TWiki-4.1.2, Mon, 26 Mar 2007, build 13227
AppliesTo Engine
Component

Priority Enhancement
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2007-12-23 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback