Hi, Committed. On Tue, Apr 22, 2008 at 06:12:55PM +0200, Johannes Hofmann wrote:
Hi,
attached is a patch that make phrase search work. I'm not 100% sure about the CharIterator::prev() change. CharIterator::next() returned \0 between words, prev() didn't. So something was wrong. I decided to go with current next() behaviour and made prev() return \0 as word separator too.
It looks reasonable. BTW, while working on fixing the parsing of " " (a not yet committed work), I found that it's not clear how non-breaking whitespace is handled/represented. Currently we have a parser/dw mix that tries to render it "right" for HTML. The idea is to decide how to render inside the HTML parser and to use dw for that. Now there's some HTML logic built in dw, which would be good not to have (an idea we talked with Sebastian long ago). For instance dillo1 handles NBSP better in some cases and worse in others than dillo2. I think it'll have to wait until I find some time to dig into it...
Also the current implementation only works if one enters exactly one blank between words in the search dialog. Should we collapse multiple blanks into one automatically?
As a workaround, I don't see why not. BTW, the phrase search doesn't work with text wrapped by the PRE element. This probably is related to a whole sentence/line stored as a single dw word. -- Cheers Jorge.-