Skip to content

Commit bd251d6

Browse files
authored
Merge pull request microsoft#45946 from danielfrankcom/danielfrankcom/microsoft#21423
Fixes microsoft#21423 | Add ANSI colour tokens as children of existing tokens
2 parents c4e45c4 + 63e6e4e commit bd251d6

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)