File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,11 @@ def test_url_followed_comma(self):
231
231
self .assertEqual (result .html , u'text <a href="http://example.com">http://example.com</a>,' )
232
232
self .assertEqual (result .urls , [u'http://example.com' ])
233
233
234
+ def test_url_with_path_followed_comma (self ):
235
+ result = self .parser .parse (u'text http://example.com/abcde, more' )
236
+ self .assertEqual (result .html , u'text <a href="http://example.com/abcde">http://example.com/abcde</a>, more' )
237
+ self .assertEqual (result .urls , [u'http://example.com/abcde' ])
238
+
234
239
def test_url_followed_brace (self ):
235
240
result = self .parser .parse (u'text http://example.com)' )
236
241
self .assertEqual (result .html , u'text <a href="http://example.com">http://example.com</a>)' )
Original file line number Diff line number Diff line change 59
59
PATH_ENDING_CHARS = r'[%s\)=#/]' % UTF_CHARS
60
60
QUERY_ENDING_CHARS = '[a-z0-9_&=#]'
61
61
62
- URL_REGEX = re .compile ('((%s)((https?://|www\\ .)(%s)(\/%s*%s?)?(\?%s*%s)?))'
62
+ URL_REGEX = re .compile ('((%s)((https?://|www\\ .)(%s)(\/( %s*%s) ?)?(\?%s*%s)?))'
63
63
% (PRE_CHARS , DOMAIN_CHARS , PATH_CHARS ,
64
64
PATH_ENDING_CHARS , QUERY_CHARS , QUERY_ENDING_CHARS ),
65
65
re .IGNORECASE )
You can’t perform that action at this time.
0 commit comments