After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755166 - room: Be more strict when highlighting messages
room: Be more strict when highlighting messages
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-17 14:44 UTC by Florian Müllner
Modified: 2015-09-21 21:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
room: Be more strict when highlighting messages (1.71 KB, patch)
2015-09-17 14:44 UTC, Florian Müllner
none Details | Review
room: Be more strict when highlighting messages (1.90 KB, patch)
2015-09-17 16:02 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2015-09-17 14:44:12 UTC
See patch - this is something Allan and Andrea were particularly interested in :-)
Comment 1 Florian Müllner 2015-09-17 14:44:17 UTC
Created attachment 311560 [details] [review]
room: Be more strict when highlighting messages

We currently highlight a messages if it contains the nick we match on,
regardless of where the match occurs. While this simplistic approach
works well enough for most nicks, it results in an annoying amount of
false positives for nicks that commonly appear in words. So tighten our
matching to require non-alphanumeric characters before and after the
nick.
Comment 2 Bastian Ilsø 2015-09-17 15:23:54 UTC
Review of attachment 311560 [details] [review]:

>> We currently highlight a messages
s/messages/message

>> So tighten our matching to require non-alphanumeric characters before and after the nick.
I misinterpret this as that you have to have non-alphanumeric characters before and after the nick. how about "So tighten our matching to stop matching alphanumeric characters before and after the nick." ?

couldn't read the code sry. :-)
Comment 3 Florian Müllner 2015-09-17 16:02:04 UTC
Created attachment 311566 [details] [review]
room: Be more strict when highlighting messages

(In reply to Bastian Ilsø from comment #2)
> >> So tighten our matching to require non-alphanumeric characters before and after the nick.
> I misinterpret this as that you have to have non-alphanumeric characters
> before and after the nick.

To your defense, that's what the message says - it's mostly accurate, except that we consider the very beginning or end of the message as "non-alphanumeric" (in the latter case, that's technically true for '\0'-terminated strings).


> couldn't read the code sry. :-)

Here's a less concise version, is that better?
Comment 4 Bastian Ilsø 2015-09-17 16:04:07 UTC
(In reply to Florian Müllner from comment #3)
> Here's a less concise version, is that better?

yes :)

btw still an s too much in "messages" (should be "message" i assume?)
Comment 5 Florian Müllner 2015-09-21 21:27:26 UTC
Attachment 311566 [details] pushed as 2d06b9e - room: Be more strict when highlighting messages