Skip to content

Commit ea9edd0

Browse files
authored
Replace inner text whitespace unicode characters other than \n and \r with (microsoft#218324)
replacing the inner text unicode characters other than \n and \r with whitespace
1 parent e5d157c commit ea9edd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/editor/contrib/hover/browser/markdownHoverParticipant.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ class MarkdownRenderedHoverParts implements IRenderedHoverParts<MarkdownHover> {
379379
if (!renderedHoverPart) {
380380
return undefined;
381381
}
382-
const accessibleContent = renderedHoverPart.hoverElement.innerText.trim();
382+
const hoverElementInnerText = renderedHoverPart.hoverElement.innerText;
383+
const accessibleContent = hoverElementInnerText.replace(/[^\S\n\r]+/gu, ' ');
383384
return accessibleContent;
384385
}
385386

0 commit comments

Comments
 (0)