From f2190d3abd9a6d69bdd24e4d477f7e35ba67e203 Mon Sep 17 00:00:00 2001 From: Matt Gleason Date: Sun, 18 Aug 2024 18:52:43 -0400 Subject: [PATCH] fixed embedding full jupyter notebook --- main.ts | 7 ++++++- manifest.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/main.ts b/main.ts index 706634d..d294328 100644 --- a/main.ts +++ b/main.ts @@ -83,7 +83,12 @@ export default class EmbedCodeFile extends Plugin { srcLinesNum = analyseSrcLines(srcLinesNumString) } - let parsedSrc: any = codeParser.parseCode(fullSrc, metaYaml.ARGS.toString()) + let args: string = null + if (metaYaml.ARGS) { + args = metaYaml.ARGS.toString() + } + + let parsedSrc: any = codeParser.parseCode(fullSrc, args) if (parsedSrc instanceof Error) { const errMsg = `\`ERROR: ${parsedSrc.message}\`` await MarkdownRenderer.renderMarkdown(errMsg, el, '', this) diff --git a/manifest.json b/manifest.json index d6cdff2..42ecd0e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "embed-code-file-ipynb-as-python", "name": "Embed Code File with Jupyter Notebook Support", - "version": "1.1.1", + "version": "1.1.2", "minAppVersion": "0.15.0", "description": "This is a plugin for Obsidian that allows for embedding code files.", "author": "Obsidian",