Skip to content

Commit

Permalink
🎨 clean up markdown postprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Dec 24, 2024
1 parent 030ee15 commit f1b61e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/obsidian/markdownProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,8 @@ export class MarkdownProcessor {
}

postProcess = (element: HTMLElement) => {
const paragraphs = element.querySelectorAll<HTMLParagraphElement>("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();
}
Expand Down
6 changes: 1 addition & 5 deletions src/slidesExtended-Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f1b61e3

Please sign in to comment.