> Also, I find myself quite unable to understand where in the process > the wikifier is triggered matching the text against any formatters. I > keep running circles from displayTiddler, over refreshTiddler, some > awkward getRecursiveTiddlerText chucking stuff into some innerHTML and > back to square 1 ...but I can't figure out how this whole procees > works.
I believe (though I could be wrong), that the wikifier is triggered in the view macro[1]. I believe the formatters are triggered in the SubWikifyTerm function[2]. Basically, the wikifier is called, sometimes recursively, and at each step the formatters directly add stuff to the DOM element passed in while any matching regexp consumes some text (if that text needs wikifying, then it is passed into SubWikify (the recursive bit), which starts the process over again on the small subset of text). When there is no more text left to wikify, it's done. Ben [1] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Macros.js#L449 [2] https://github.com/TiddlyWiki/tiddlywiki/blob/master/js/Wikifier.js#L145 -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev?hl=en.
