A non-wikiname topic which does not begin with a capital letter cannot be accessed using
TML. Setting the
edit scripts
onlywikiname parameter to "no" allows one to create a topic name such as "cow", which when accessed as [[cow]] searches for "Cow".
It'd be helpful to have some form of
TML markup to access these topics.
Being able to use arbitrary capitalization for topic names is very handy when documenting programming constructs (programs or functions) which have case sensitive names.
It's interesting to note that the default
%METASEARCH% template uses raw
HTML to build its links, and therefore side steps the problem:
<a href="%SCRIPTURLPATH{"view"}%/%WEB%/%TOPICNAME%">%TOPICNAME%</a>
TWiki:Main.DiabJerius
Here's a suggestion for implementation. If the first character in a bracketed link is an exclamation point, then don't capitalize the remaining word. While the code does currently allow creation of topics with a first character of
!, its use elsewhere to escape
CamelCase words implies that it is not expected to be used in a topic name.
The actual implementation would happen in several places.
- A small change to
Render::internalLink:
< $theTopic =~ s/^(.)/\U$1/;
---
> if( '!' eq substr($theTopic,0,1) )
> {
> $theTopic =~ s/^!//;
>
> } else {
> $theTopic =~ s/^(.)/\U$1/;
> }
740a747
> $text =~ s/(@\w*)/$1$TWiki::cfg{AntiSpam}{EmailPadding}/;
- Changes to
Render::_handleSquareBracketedLink to handle the case where no link text is provided (the initial ! character should be removed)
- Ensuring that TWiki generated double bracket links (via both code and templates) use the
[[!link]] notation.
TWiki:Main.DiabJerius