MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / getHtmlMessage

Function getHtmlMessage

src/platform/errors/errorUtils.unit.test.ts:9–15  ·  view source on GitHub ↗
(markdown: string)

Source from the content-addressed store, hash-verified

7suite('Error Utils', () => {
8 suite('Markdown links to Hrefs', () => {
9 function getHtmlMessage(markdown: string) {
10 const output = createOutputWithErrorMessageForDisplay(markdown);
11 const { stack } = JSON.parse(new TextDecoder().decode(output!.items[0].data).toString()) as {
12 stack: string;
13 };
14 return stack.replace('\u001b[1;31m', '');
15 }
16 test('Markdown links to Hrefs', () => {
17 const markdown = 'This is a [link](https://www.microsoft.com)';
18 const expected = "This is a <a href='https://www.microsoft.com'>link</a>";

Callers 1

Calls 5

parseMethod · 0.65
toStringMethod · 0.65
decodeMethod · 0.65
replaceMethod · 0.45

Tested by

no test coverage detected