I have never cared for CamelCase. I have enough folks in my family tree and 
coworkers and my work subject matter, that camelcase is far more trouble 
than it's worth. I have overridden the automatic link creation at least ten 
times for every time I wanted it. Camelcase was just a nuisance for me. I 
have routinely wiped out the camelcase module, but that wasn't a very 
TiddlyWiki solution. So I decided to create a camelcase whitelist; a list 
of words that I didn't want to become automatically links ever. The words I 
put on my whitelist are mostly proper names and some chemistry. It wasn't 
directly related to my editor project (http://tw5editor.tiddlyspot.com/) 
but as long as I was mucking around in the code I thought I would attack 
the issue as well. 

The code is a fairly straightforward modification to the 
$:/core/modules/parsers/wikiparser/rules/wikilink.js 
<http://tw5editor.tiddlyspot.com/#%24%3A%2Fcore%2Fmodules%2Fparsers%2Fwikiparser%2Frules%2Fwikilink.js>
 
tiddler:

// If the link starts with the unwikilink character then just output it as 
plain text
> if(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {
>   return [{type: "text", text: linkText.substr(1)}];
> }
> // If the link is on the whitelist then just output it as plain text
> var dummy=$tw.config.whitelist.indexOf(linkText);
> if(dummy>-1) {
>    return [{type: "text", text: linkText}];
> }
>
>
The whitelist itself is in  $:/core/modules/whitelistconfig.js which is, 
like the tiddler I copied as a starting point, a config module. All of that 
seems to work fine. 

What worries me is that it seems like it should be a simple matter to mess 
up the whitelist module and make the wiki unusable. I would rather have my 
whitelist in some ordinary tiddler without a lot of essential braces and 
parenthesis. Is there some simple way of doing that that I have missed?

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to