Skip to content

Commit 339e4f3

Browse files
committed
feat: Allow zero width thatMarks and sourceMark to pass
1 parent ac62b67 commit 339e4f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ export function mergeOverlappingDecorations(decorations: DecorationItem[]): Deco
102102
): boolean {
103103
const className = d.properties?.class;
104104
console.debug("[handleZeroWidthDecoration] className:", className, "decoration:", JSON.stringify(d, null, 2));
105-
if (className === "selection") {
105+
if (className === "selection" || className === "thatMark" || className === "sourceMark") {
106+
// For zero-width thatMark or sourceMark, just pass (do not merge or throw)
107+
if (className === "thatMark" || className === "sourceMark") {
108+
return false; // not handled, will be added to filteredZeroWidth
109+
}
106110
const pos = isPosition(d.start) ? `${d.start.line}:${d.start.character}` : String(d.start);
107111
const prevIdx = endPosToIdx.get(pos);
108112
const nextIdx = startPosToIdx.get(pos);

0 commit comments

Comments
 (0)