glguy / irc-core

Haskell IRC library and console client - Join us on libera.chat #glirc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nick highlighting is a bit weird sometimes

swantzter opened this issue · comments

(like highlighting t in don't)

Current behavior is to search for runs of nick-characters in a chat message. I'd be interested in a better algorithm. I want to make sure cases like I heard "glguy was here" to catch glguy.

What about requiring 2 or more chars for nick highlighting. Not that many has a one letter nick and they might as well be highlighted with the standard text colour

Isn’t this still an issue if a nick is a substring of a word?

No, it only matches whole sequences of nickname characters. exampleglguy wouldn't highlight glguy, for example.