cleanup examples for multi sprites

This commit is contained in:
Wolfsblvt
2025-02-19 22:30:51 +01:00
parent 531999dc04
commit bd6da695c8
3 changed files with 16 additions and 5 deletions

View File

@@ -128,7 +128,7 @@ router.get('/get', jsonParser, function (request, response) {
const fileName = path.parse(pathToSprite).name.toLowerCase();
// Extract the label from the filename via regex, which can be suffixed with a sub-name, either connected with a dash or a dot.
// Examples: joy.png, joy-1.png, joy.expressive.png, 美しい-17.png
// Examples: joy.png, joy-1.png, joy.expressive.png
const label = fileName.match(/^(.+?)(?:[-\\.].*?)?$/)?.[1] ?? fileName;
return {