[tw] Re: wikiword evaluation function

2010-08-30 Thread PMario
hi
A regExp would work. if it matches than it is a wikilink. The
formatter can be found at: 
http://www.tiddlytools.com/insideTW/#config.formatters
look at 10: wikiLink.
hope this helps
-m
On Aug 30, 7:19 pm, okido bkn...@gmail.com wrote:
 Is there a wikiword evaluation function that I can use in a script,
 something like:

 var bool = wikiWord('STring');

 Remember to share good fortune with friends, Okido

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: wikiword evaluation function

2010-08-30 Thread okido
Thanks PMario, exactly what I was looking for.

Code will look like:

script

var pattern = new RegExp( past the code here from config.formatters
);

To test and change a STring that is a wikiword:

if (pattern.test(STring)) { STring = '~' + STring ; }

/script

Have a nice day, Okido


On 30 Aug, 19:34, PMario pmari...@gmail.com wrote:
 hi
 A regExp would work. if it matches than it is a wikilink. The
 formatter can be found 
 at:http://www.tiddlytools.com/insideTW/#config.formatters
 look at 10: wikiLink.
 hope this helps
 -m
 On Aug 30, 7:19 pm, okido bkn...@gmail.com wrote:

  Is there a wikiword evaluation function that I can use in a script,
  something like:

  var bool = wikiWord('STring');

  Remember to share good fortune with friends, Okido

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.