Skip to content

Commit be7e224

Browse files
committed
feat: Update returned array order of createDecorations
1 parent 7035b44 commit be7e224

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

packages/test-case-component/src/helpers.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,23 @@ function createDecorations(
5353
): DecorationItem[][] {
5454
const { marks, ide, lines, selections, thatMark, sourceMark } = options
5555

56-
const decorations: DecorationItem[] = [];
56+
const decorations: DecorationItem[][] = [];
57+
5758
const markDecorations = getMarkDecorations({ marks, lines })
5859
const ideFlashDecorations = getIdeFlashDecorations({ lines, ide })
59-
decorations.push(...markDecorations);
60-
decorations.push(...ideFlashDecorations);
6160
const selectionRanges = getSlections({ selections })
62-
decorations.push(...selectionRanges);
61+
const sourceMarks_ = getSourceMarks({ sourceMark })
62+
63+
decorations.push(markDecorations);
64+
decorations.push(ideFlashDecorations);
65+
decorations.push(selectionRanges);
66+
decorations.push(sourceMarks_);
6367

6468
if (thatMark) {
65-
const modificationReferences = getThatMarks({ thatMark })
66-
decorations.push(...modificationReferences);
69+
const thatMarks = getThatMarks({ thatMark })
70+
decorations.push(thatMarks);
71+
} else {
72+
decorations.push([])
6773
}
6874

6975
return decorations

0 commit comments

Comments
 (0)