Skip to content

Commit

Permalink
Merge pull request #2 from valentine195:valentine195/issue1
Browse files Browse the repository at this point in the history
- Processor no longer parses inside code blocks
  • Loading branch information
valentine195 authored Aug 15, 2021
2 parents 134a1eb + 18875ae commit 005286a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "markdown-attributes",
"name": "Markdown Attributes",
"version": "1.0.0",
"version": "1.0.1",
"minAppVersion": "0.12.10",
"description": "Add markdown attributes to elements in Obsidian.md",
"author": "Jeremy Valentine",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "markdown-attributes",
"version": "1.0.0",
"version": "1.0.1",
"description": "Add markdown attributes to elements in Obsidian.md",
"main": "main.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@ export default class Processor {
}

// Recursively find all attributes from the children of this element.

for (let child of Array.from(el.children)) {
if (!(child instanceof HTMLElement)) continue;
if (child instanceof HTMLPreElement || child.tagName.toLowerCase() === "code")
continue;
elements.push(...this.recurseAndParseElements(child));
}

Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"0.0.7": "0.12.0",
"1.0.0": "0.12.0"
"1.0.1": "0.12.0"
}

0 comments on commit 005286a

Please sign in to comment.