mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 17:52:55 +00:00
Allow hyphens in Wikipedia subdomain
When recognizing a Wikipedia tag value as a URL, allow hyphens in the URL subdomain, e.g. zh-min-nan.wikipedia.org.
This commit is contained in:
@@ -84,7 +84,7 @@ iD.ui.preset.wikipedia = function(field, context) {
|
||||
|
||||
function change() {
|
||||
var value = title.value(),
|
||||
m = value.match(/https?:\/\/([a-z]+)\.wikipedia\.org\/wiki\/(.+)/),
|
||||
m = value.match(/https?:\/\/([-a-z]+)\.wikipedia\.org\/wiki\/(.+)/),
|
||||
l = m && _.find(iD.data.wikipedia, function(d) { return m[1] === d[2]; });
|
||||
|
||||
if (l) {
|
||||
|
||||
Reference in New Issue
Block a user