support string span
This commit is contained in:
parent
71c163f9fb
commit
74f3f58942
1 changed files with 2 additions and 0 deletions
|
@ -619,6 +619,7 @@ Ox.URL = function(options) {
|
|||
canBeDuration = types.indexOf('duration') > -1,
|
||||
canBeLocation = types.indexOf('location') > -1,
|
||||
canBeNumber = types.indexOf('number') > -1,
|
||||
canBeString = types.indexOf('string') > -1,
|
||||
length = str.split(',').length;
|
||||
// !/^\d{7}$/.test(str) avoids matching imdb ids
|
||||
return canBeDate && /\d-/.test(str) ? 'date'
|
||||
|
@ -629,6 +630,7 @@ Ox.URL = function(options) {
|
|||
: canBeDate && !/\./.test(str) && !/^\d{7}$/.test(str) ? 'date'
|
||||
: canBeLocation && length == 2 ? 'location'
|
||||
: canBeNumber && /^\d+$/.test(str) ? 'number'
|
||||
: canBeString && str.length ? 'string'
|
||||
: '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue