mrshu / brutal-plugins

A set of plugins for brutal, the mighty chatbot
Apache License 2.0
4 stars 2 forks source link

Url matcher: deal with IRC coloring #38

Closed mrshu closed 9 years ago

mrshu commented 9 years ago

When a new commit gets merged or pull request gets created URL matcher currently matches something like http://git.io/ELctCQ<EOC> where <EOC> is ASCII 15 character. I believe we should somehow get around this.

mrshu commented 9 years ago

cc @Adman

pepol commented 9 years ago

Note that it is ASCII 0x15 character, not 0x0F.

mrshu commented 9 years ago

@pepol I'm not so sure about that. Here is what Python outputs for me

u"\x0302\x1fhttp://git.io/ELctCQ\x0f"
mrshu commented 9 years ago

In general one way of fixing this would be to make the regex stop taking stuff once it finds \x

pepol commented 9 years ago

Oh sorry, I must've remembered it wrong then...

mrshu commented 9 years ago

@pepol np, this should be one line fix anyway, care to do the honours?

pepol commented 9 years ago

@mrshu see #39.