Rename test #913 -> #957, comment

Make test for #957 reference correct bug. Add comment.

Previous commit closes #957.
This commit is contained in:
Matthew Honnibal 2017-04-07 15:54:25 +02:00
parent be204ed714
commit 83dca920d4
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,7 @@
from __future__ import unicode_literals
# The use of this module turns out to be important, to avoid pathological
# back-tracking. See Issue #957
import regex
# URL validation regex courtesy of: https://mathiasbynens.be/demo/url-regex
@ -23,6 +25,8 @@ _URL_PATTERN = (
# excludes reserved space >= 224.0.0.0
# excludes network & broadcast addresses
# (first & last IP address of each class)
# MH: Do we really need this? Seems excessive, and seems to have caused
# Issue #957
r"(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])"
r"(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}"
r"(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))"