diff --git a/src/obsidian/markdownProcessor.ts b/src/obsidian/markdownProcessor.ts index 1c93cf5..607571d 100644 --- a/src/obsidian/markdownProcessor.ts +++ b/src/obsidian/markdownProcessor.ts @@ -286,10 +286,8 @@ export class MarkdownProcessor { } postProcess = (element: HTMLElement) => { - const paragraphs = element.querySelectorAll("p"); - for (let index = 0; index < paragraphs.length; index++) { - const paragraph = paragraphs.item(index); - + const paragraphs = element.findAll("p"); + for (const paragraph of paragraphs) { if (paragraph.innerText.startsWith(":::")) { paragraph.remove(); } diff --git a/src/slidesExtended-Plugin.ts b/src/slidesExtended-Plugin.ts index 6d0a804..825a31f 100644 --- a/src/slidesExtended-Plugin.ts +++ b/src/slidesExtended-Plugin.ts @@ -148,11 +148,7 @@ export class SlidesExtendedPlugin extends Plugin { } getTargetName(): string { - console.log("target", this.target); - if (!this.target) { - return ""; - } - return this.target.name; + return this.target ? this.target.name : ""; } onChange(file: TAbstractFile) {