Dont strip trailing punctuation from end of URL if next line startswith url characters

This commit is contained in:
Kovid Goyal
2020-03-15 08:47:52 +05:30
parent e86c712424
commit 12f37bcfad
4 changed files with 32 additions and 7 deletions

View File

@@ -285,6 +285,10 @@ class TestDataTypes(BaseTest):
l4 = create('http://a.b?q=1' + trail)
self.ae(l4.url_end_at(1), len(l4) - 1)
l4 = create('http://a.b.')
self.ae(l4.url_end_at(0), len(l4) - 2)
self.ae(l4.url_end_at(0, 0, True), len(l4) - 1)
def rewrap(self, lb, lb2):
hb = HistoryBuf(lb2.ynum, lb2.xnum)
cy = lb.rewrap(lb2, hb)