[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    [Kopete-devel] Re: [Bug 62235] not all emoticons get parsed - :D:D
From:       Richard Smith <kde () metafoo ! co ! uk>
Date:       2003-11-06 3:54:02
[Download RAW message or body]

On Wednesday 05 November 2003 5:30 pm, Jason Keirstead wrote:
> On November 05, 2003 12:52 pm, you wrote:
> > That's not true. It's exactly the same as any other recursive-descent
> > approach with backtracking, such as the one your regular expressions to
> > detect emoticons in the first place use.
>
> This isn't true. This is the current loop.
>

"Strategy 1:"
> for each emotiocon A....
> 	replace A with image
> end for
>
> This would be the new one

"Strategy 2:"
> for each emotiocon A..
>   for each emotiocon B...
>      replace (break or B)A(break or B) with (match1)(image)(match2)
>   end for
> end for
>
> Unless you know some other way to do it.

Equivalent to your second suggestion but probably much faster, we have 
"Strategy 3:"

X = (break|A1|A2|A3|...|An) where Ai are the emoticons

for each emoticon A
  replace (X)A(X) with \1image\2
end for

But that would incorrectly parse something like "(::printf..." if (: and :p 
are both emoticons. The approach I was thinking of got this right, but was 
asymptotically slower.

Anyway, the question still remains, should this change be made at all? Which 
is more important, people being able to say "f(X)" without KMess 'fixing' it, 
or people being able to say "lol:)" and getting a smiley? I think the former, 
others might disagree.

lilac
_______________________________________________
Kopete-devel mailing list
Kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic