MusicXML 표준 확장자를 지원한다

파일 선택 목록과 가져오기 분기에서 .musicxml 확장자를 .xml 및 .mxl과 동일하게 처리한다. 한국어 파일명의 MusicXML 악보를 실제로 불러올 수 있도록 제목 정리 규칙도 맞췄다.
This commit is contained in:
이창현
2026-10-03 07:59:20 +09:00
parent a69c5362c3
commit b51da176a1
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -313,7 +313,7 @@ export const useAppStore = create<AppState>((set, get) => {
try {
const id = crypto.randomUUID();
// M4 - strip path separators, control chars; cap length
const rawTitle = file.name.replace(/\.(xml|mxl)$/i, "");
const rawTitle = file.name.replace(/\.(xml|musicxml|mxl)$/i, "");
const title = rawTitle.replace(/[\x00-\x1f\x7f/\\]/g, "").slice(0, 200) || "Untitled";
const xmlBytes = await file.arrayBuffer();