Skip to content

Commit

Permalink
fix(markdown): implement getContainingDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed May 23, 2024
1 parent a5bc717 commit 856fb5c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,14 @@ export function create({
return await findMarkdownFilesInWorkspace(URI.parse(context.env.workspaceFolder));
},

getContainingDocument() {
return undefined;
getContainingDocument(resource) {
const decoded = context.decodeEmbeddedDocumentUri(resource.toString());
if (decoded) {
return {
uri: URI.parse(decoded[0]),
children: [],
};
}
},

hasMarkdownDocument(resource) {
Expand Down

0 comments on commit 856fb5c

Please sign in to comment.