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 <noreply@anthropic.com>
This commit is contained in:
Jose Luis
2026-03-20 16:42:38 +01:00
parent 943ba0b51c
commit eee405d5d9

View File

@@ -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) {