Ox.URL: don't treat 7-digit numbers as dates
This commit is contained in:
parent
e21f184d96
commit
1115a33a5f
1 changed files with 2 additions and 1 deletions
|
@ -586,10 +586,11 @@ Ox.URL = function(options) {
|
|||
: canBeLocation && length == 4 ? 'location'
|
||||
// leaves us with [-]D[.D][,[-]D[.D]]
|
||||
: canBeDuration ? 'duration'
|
||||
: canBeDate && !/\./.test(str) ? 'date'
|
||||
: canBeDate && !/\./.test(str) && !/^\d{7}$/.test(str) ? 'date'
|
||||
: canBeLocation && length == 2 ? 'location'
|
||||
: canBeNumber && /^\d+$/.test(str) ? 'number'
|
||||
: '';
|
||||
// !/^\d{7}$/.test(str) avoids matching imdb ids
|
||||
}
|
||||
|
||||
function parseCondition(str) {
|
||||
|
|
Loading…
Reference in a new issue