diff --git a/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/index.tsx b/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/index.tsx index c56ba099c..6b299db18 100644 --- a/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/index.tsx +++ b/gui/src/components/StyledMarkdownPreview/StepContainerPreToolbar/index.tsx @@ -207,7 +207,7 @@ export function StepContainerPreToolbar({ setAppliedFileUri(undefined); } - function onClickFilename() { + async function onClickFilename() { if (appliedFileUri) { ideMessenger.post("showFile", { filepath: appliedFileUri, @@ -215,8 +215,13 @@ export function StepContainerPreToolbar({ } if (relativeFilepath) { + const filepath = await inferResolvedUriFromRelativePath( + relativeFilepath, + ideMessenger.ide, + ); + ideMessenger.post("showFile", { - filepath: relativeFilepath, + filepath, }); } } diff --git a/gui/src/components/StyledMarkdownPreview/index.tsx b/gui/src/components/StyledMarkdownPreview/index.tsx index 36700cf46..1d96f7e5d 100644 --- a/gui/src/components/StyledMarkdownPreview/index.tsx +++ b/gui/src/components/StyledMarkdownPreview/index.tsx @@ -221,7 +221,7 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview( visit(tree, "code", (node: any) => { if (!node.lang) { - node.lang = "javascript"; + node.lang = ""; } else if (node.lang.includes(".")) { node.lang = node.lang.split(".").slice(-1)[0]; }