|
@@ -967,9 +967,10 @@ export function getGradualLengthByXml(xml) {
|
|
|
isLastNoteAndNotClosed = true;
|
|
|
}
|
|
|
}
|
|
|
+ const isKeyWork = keys.find(k => k.startsWith(textContent) || textContent?.startsWith(k))
|
|
|
if (
|
|
|
ele.type === "metronome" ||
|
|
|
- (ele.type === "words" && (textContent.startsWith("a tempo") || keys.includes(textContent)) || isLastNoteAndNotClosed)
|
|
|
+ (ele.type === "words" && (textContent.startsWith("a tempo") || isKeyWork) || isLastNoteAndNotClosed)
|
|
|
) {
|
|
|
const indexOf = gradualNotes.findIndex((item) => item.length === 1);
|
|
|
if (indexOf > -1 && ele.index > gradualNotes[indexOf]?.[0].start) {
|
|
@@ -983,7 +984,7 @@ export function getGradualLengthByXml(xml) {
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
- if (ele.type === "words" && keys.includes(textContent)) {
|
|
|
+ if (ele.type === "words" && isKeyWork) {
|
|
|
gradualNotes.push([
|
|
|
{
|
|
|
start: ele.index,
|