Rename has long suffered from some horrible problems.
- it requires a "special" undocumented view in Search.pm to work
- the topics matched by that initial search are different to the topics matched by the actual process that does the grep, so there is a real risk of missing topics.
- because it uses SEARCH, it cannot ignore NOSEARCHALL
- it's way over-complicated. It took me ages to work out exactly how it worked.
I have cured all these problems - and more - as follows:
- recoded the initial search so it is done from code instead of a variable. Sounds more expensive, but it actually saves quite a lot of code because the renameview is no longer needed, so
- removed the renameview from Search
- generalised the replacement code into a
forEachLine parser method that iterates over the lines in a topic, tracking pre and verbatim etc.
- shared the "wikiword recognition" code with the actual rendering code, so it's harder to get confused over what is a wikiword and what isn't
- added a unit test for the rename process.
The only change from an end user perspective is a change to the way the search is presented; it has become a lot more comapact.
For a demo, see ntwiki, or svn up your checkout area.
--
CrawfordCurrie - 18 Apr 2005
Looks better. Did you remove the last topic's author on purpose?
--
ArthurClemens - 18 Apr 2005
Yeeeees, sort of. Basically I radically simplified the search.
My feeling is that if you wanted that sort of detail, you would do a proper search, and it's just noise in a rename view.
But the main difference is that now the rename code has a consistent view of "what is a wikiword" as the rendering code.
--
CrawfordCurrie - 19 Apr 2005