From eee405d5d940b1185c18f9b1727aac24df1f718b Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Fri, 20 Mar 2026 16:42:38 +0100 Subject: [PATCH] fix: editor varName broke on map IDs with digits after hyphens house-a-1f generated 'houseA-1f' (invalid JS identifier) because the regex only matched -[a-z], not -[0-9]. Changed to -(\w) to handle all word characters after hyphens. Co-Authored-By: Claude Opus 4.6 --- editor.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.html b/editor.html index 7507044..127971f 100644 --- a/editor.html +++ b/editor.html @@ -941,7 +941,7 @@ function generateMapsJS() { } function varName(mapId) { - return mapId.replace(/-([a-z])/g, (_, c) => c.toUpperCase()); + return mapId.replace(/-(\w)/g, (_, c) => c.toUpperCase()); } function compressCols(cols) {