feat: fix filepaht issues w/ apply
This commit is contained in:
parent
5f4a9e5189
commit
6c848ba7a7
2 changed files with 8 additions and 3 deletions
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue