On Sat, Feb 14, 2009 at 12:29:32AM +0000, Jo?o Ricardo Louren?o wrote:
Sex, 2009-02-13 ?s 00:41 +0000, corvid escreveu:
Jo?o wrote:
Qui, 2009-02-12 ?s 23:43 +0000, corvid escreveu:
Jo?o wrote:
I've been trying to understand what's going on in CharIterator::prev() and have been running tests and I have a question regarding iterator.hh.
In the following code:
inline static bool charsEqual (char c1, char c2, bool caseSens) { return caseSens ? c1 == c2 : tolower (c1) == tolower (c2) || (isspace (c1) && isspace (c2)); }
Why are we checking if c1 and c2 are spaces? This is the code that, according to my tests, is wrecking the search-previous functionality.
We do want to regard whitespace chars as equivalent, don't we?
hm..Well, but doesn't c1 == c2 do the job? The tolower() call wouldn't 'change' the whitespace, as far as I know. Or do we want to consider ' ' a tab too (for example)? Maybe I missed the point. :S
I think we want to treat something like tab and space as the same.
OK, I'm not quite sure why we want that,
When parsing in HTML mode, all whitespace are equal.
but now I'll try to focus on why it fails with thast particular expression. Thanks for that.
-- Cheers Jorge.-