Skip to content

Commit 63e6e4e

Browse files
Fixes microsoft#21423 | Add ANSI colour tokens as children of existing tokens
1 parent ca666da commit 63e6e4e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/vs/workbench/parts/debug/electron-browser/replViewer.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,13 @@ export class ReplExpressionsRenderer implements IRenderer {
352352
}
353353

354354
currentToken = token;
355-
tokensContainer.appendChild(token);
355+
356+
// get child until deepest nested node is found
357+
let childPointer: Node = tokensContainer;
358+
while (childPointer.hasChildNodes() && childPointer.firstChild.nodeName !== '#text') {
359+
childPointer = childPointer.firstChild;
360+
}
361+
childPointer.appendChild(token);
356362

357363
i = index;
358364
}

0 commit comments

Comments
 (0)