X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/2f8b33afce5cd34432db91fbd4d6950bd38359a3..16f28ac4d03efe2e5e53766f26a6d6b0e4974c5f:/src/components/SearchSectionDetails.svelte diff --git a/src/components/SearchSectionDetails.svelte b/src/components/SearchSectionDetails.svelte index c30f057..5ca614a 100644 --- a/src/components/SearchSectionDetails.svelte +++ b/src/components/SearchSectionDetails.svelte @@ -6,8 +6,8 @@ function handleFormSubmit(event) { let form_el = event.target; let val = form_el.querySelector('input[type=edit]').value.trim(); - let type_and_id_match = val.match(/^\s*([NWR])(\d+)\s*$/i) - || val.match(/\/(relation|way|node)\/(\d+)\s*$/); + let type_and_id_match = val.match(/^\s*([NWR])(-?\d+)\s*$/i) + || val.match(/\/(relation|way|node)\/(-?\d+)\s*$/); var params = new URLSearchParams(); if (type_and_id_match) { @@ -27,11 +27,15 @@