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:
@@ -941,7 +941,7 @@ function generateMapsJS() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function varName(mapId) {
|
function varName(mapId) {
|
||||||
return mapId.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
return mapId.replace(/-(\w)/g, (_, c) => c.toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
function compressCols(cols) {
|
function compressCols(cols) {
|
||||||
|
|||||||
Reference in New Issue
Block a user