Skip to content

Commit

Permalink
fixed embedding full jupyter notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
mjg-foundation committed Aug 18, 2024
1 parent b54aa3a commit f2190d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 86 in main.ts

View workflow job for this annotation

GitHub Actions / build

Type 'null' is not assignable to type 'string'.
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)
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit f2190d3

Please sign in to comment.