From: Jeff D. <da...@da...> - 2000-07-17 16:47:27
|
Here's a current snapshot of my thoughts on the new transform code. This currently is in the form of a drop-in replacement for wiki_transform. However, if I were to insert this into PhpWiki now, most of it would go into wiki_stdlib. Some would go into new custum-feature module files. Only a skeleton would remain in wiki_transform. Here's some random thoughts, in order of increasing entropy: Currently this only implements wiki_transform. However it should be clear that class WikiRenderer can also be used as the basis for a modular replacement to GeneratePage(). The main thing that I'm not completely happy with (and which is not yet complete) is how the order of the WikiTransforms is specified. (It is clear that some sort of 'order' or 'precedence' parameter is required --- that's easy, I just haven't done it yet.) The hard part is handling the following issues in an efficient, clean, clear way (this issues are handled by this snapshot, but I'm not sure I'm happy with the implementation): o Some transforms are "final". When they are matched, they terminate the page rendering. o Some transforms (might) need to be applied repeatedly. Consider constructs like "__''bold-italic''__". Another issue is that putting the logic to handle these details into (what is now) the inner loop (over transforms) is slow. I think I'll try reversing the order of the loops (eg. make the loop over lines the inner loop, and see if that helps). Comments welcome. Jeff |