Fix URL detection not working for urls of the form scheme:///url

Fixes #2292
This commit is contained in:
Kovid Goyal
2020-01-17 07:49:01 +05:30
parent 96f3253e6d
commit 43326c9bd0
3 changed files with 10 additions and 4 deletions

View File

@@ -238,6 +238,9 @@ class TestDataTypes(BaseTest):
lf.set_text(t, 0, len(t), C())
return lf
l0 = create('file:///etc/test')
self.ae(l0.url_start_at(0), 0)
for trail in '.,]>)\\':
lx = create("http://xyz.com" + trail)
self.ae(lx.url_end_at(0), len(lx) - 2)