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

fix regular expression for detecting links in stdout #3078

Merged
merged 1 commit into from Mar 27, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 25, 2013

The previous expression was matching both the beginning and the end of the line, which would end up swallowing the next match, ultimately matching every other URL in the string.

This removes the end-of-line check, so it will match every URL.

The wrapURLs function to make URLs easier to identify does not seem to have been necessary, and has thus been removed.

closes #2834

The previous expression was matching both the beginning and the end of the line,
which would end up swallowing the next match,
ultimately matching every other URL in the string.

This removes the end-of-line check, so it will match every URL.

The wrapURLs function to make URLs easier to identify does not seem to have been necessary,
and has thus been removed.

closes ipython#2834
@fperez
Copy link
Member

fperez commented Mar 26, 2013

This looks clean to me, thanks! @satra, could you take it for a quick spin to see how it does for the cases where you were seeing problems? Since we're stuck in the dark ages with no tests for JS, I'd like confirmation from you before merging...

@satra
Copy link
Contributor

satra commented Mar 26, 2013

works for me after clearing the cache.

a simple test would be to do:

print http://example.com
print http://example.com

and check that the output cell contains two a references.

@Carreau
Copy link
Member

Carreau commented Mar 27, 2013

Looks fine, and seeing the above comment, merging.

Carreau added a commit that referenced this pull request Mar 27, 2013
fix regular expression for detecting links in stdout
@Carreau Carreau merged commit d28910c into ipython:master Mar 27, 2013
@minrk minrk deleted the link_re branch March 31, 2014 23:36
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
fix regular expression for detecting links in stdout
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

Successfully merging this pull request may close these issues.

url regexp only finds one link
4 participants