From 0ec1b45bf98bf2db7fab8551125a0196c65d18eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=E2=84=93e=20Hensel?= Date: Tue, 7 Mar 2023 01:58:48 +1300 Subject: [PATCH] tweak regex when searching for a feature ID (#9520) --- modules/ui/feature_list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/feature_list.js b/modules/ui/feature_list.js index c0634f1eb..38229680a 100644 --- a/modules/ui/feature_list.js +++ b/modules/ui/feature_list.js @@ -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);