Skip to content

Commit dcd3543

Browse files
authored
Set the markdown renderer on load (#1957)
This resolves the issue where when displaying the EstimateDetails widget sometimes there would be an error about the markdown renderer not being set.
1 parent 645412d commit dcd3543

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

widgets/js/index.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
EstimatesPanel,
1212
ReData,
1313
Circuit,
14+
setRenderer,
1415
} from "qsharp-lang/ux";
1516
import markdownIt from "markdown-it";
1617

@@ -20,6 +21,7 @@ import mk from "@vscode/markdown-it-katex";
2021

2122
const md = markdownIt();
2223
md.use(mk);
24+
setRenderer((input: string) => md.render(input));
2325

2426
export function mdRenderer(input: string) {
2527
// Note: Need to ensure this 'fix' is still needed with the latest data JSON.

0 commit comments

Comments
 (0)