tweak regex when searching for a feature ID (#9520)

This commit is contained in:
Kyℓe Hensel
2023-03-07 01:58:48 +13:00
committed by GitHub
parent 8b9ee46f7a
commit 0ec1b45bf9

View File

@@ -137,7 +137,7 @@ export function uiFeatureList(context) {
}
// A location search takes priority over an ID search
var idMatch = !locationMatch && q.match(/(?:^|\W)(node|way|relation|[nwr])\W?0*([1-9]\d*)(?:\W|$)/i);
var idMatch = !locationMatch && q.match(/(?:^|\W)(node|way|relation|[nwr])\W{0,2}0*([1-9]\d*)(?:\W|$)/i);
if (idMatch) {
var elemType = idMatch[1].charAt(0);