Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links that end a parenthetical expression are broken #47

Open
MasterDuke17 opened this issue Jul 18, 2016 · 3 comments
Open

Links that end a parenthetical expression are broken #47

MasterDuke17 opened this issue Jul 18, 2016 · 3 comments

Comments

@MasterDuke17
Copy link
Contributor

E.g., (this is some text and then a link, hxxp://foo.bar.com/baz) include the trailing ')' in the href. Real word example here http://irclog.perlgeek.de/perl6/2016-07-18#i_12863149

MasterDuke17 added a commit to MasterDuke17/ilbot that referenced this issue Jul 27, 2016
@moritz
Copy link
Owner

moritz commented Jul 27, 2016

Unfortunately, here's a counter-example that will break if this is fixed: http://irclog.perlgeek.de/ilbot/2016-07-27#i_12919928

Extracting URLs is really a heuristic. For example a comma is a valid part of an URL, but typically trailing commas are part of the surrounding text.

Due to the prevalence of Wikipedia-URLs that end in a closing paren, I'm likely to reject this.

@MasterDuke17
Copy link
Contributor Author

What about if I work the regex so that a ')' isn't matched unless there's
also a '(' after the 'https?://'?

On Wed, Jul 27, 2016 at 1:15 PM, Moritz Lenz [email protected]
wrote:

Unfortunately, here's a counter-example that will break if this is fixed:
http://irclog.perlgeek.de/ilbot/2016-07-27#i_12919928

Extracting URLs is really a heuristic. For example a comma is a valid part
of an URL, but typically trailing commas are part of the surrounding text.

Due to the prevalence of Wikipedia-URLs that end in a closing paren, I'm
likely to reject this.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#47 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AJx8UQNgeSIbZNMxvTCeVnZxZqOW081bks5qZ5I7gaJpZM4JPEPF
.

@moritz
Copy link
Owner

moritz commented Jul 27, 2016

As long as it doesn't lead to exploding complexity, I'd accept that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants