On Jul 6, 12:34 pm, tejjyid <[email protected]> wrote:
> Thanks very much - I've started to play around with it. I'm curious as to
> why what you've done solves the problem, but maybe I don't need to know.

the lexer.js uses loops like

for (i in objectVar) { .. }
https://developer.mozilla.org/en/JavaScript/Reference/Statements/for...in

This loop iterates over every element that is part of the objectVar.
Not only the string variables. It iterates the whole prototype chain.
(see the mdn info above)

In our case the LexerNode() function seen below, does the
"string.match(regex)" The problem is, that the string variable can be
a function() reference because of the loop mentioned above. This
actually caused the error message "string.match() ..."

function LexerNode(string, regex, regexs) {
        var a;
        this.string = string;
        this.children = [];
        if (string) {
                this.matches = string.match(regex);
...

I did change the loop at several places in the lexer.

====
The tagger actually has some of those loops too. But I didn't change
them.

have fun!
mario

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

Reply via email to