Skip to content

Commit

Permalink
fixed arg typing in main
Browse files Browse the repository at this point in the history
  • Loading branch information
mjg-foundation committed Aug 18, 2024
1 parent f2190d3 commit f7da9a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class IpynbParser implements CodeParser {
}

let keep_cells: number[] = [];
if (args) {
if (args.length > 0) {
const regex = /^(\d+)(,\d+)*$/;
if (regex.test(args)) {
keep_cells = args.split(",").map(value => parseInt(value));
Expand Down
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default class EmbedCodeFile extends Plugin {
srcLinesNum = analyseSrcLines(srcLinesNumString)
}

let args: string = null
let args: string = "";
if (metaYaml.ARGS) {
args = metaYaml.ARGS.toString()
}
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.2",
"version": "1.1.3",
"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 f7da9a1

Please sign in to comment.