Skip to content

Commit

Permalink
feat!: Removes generated id from Admonition elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Feb 25, 2022
1 parent 3e65292 commit 2f87101
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,6 @@ ${editor.getDoc().getSelection()}\n--- admonition\n`
} else if (collapse && collapse.trim() === "none") {
collapse = "";
}
const id = getID();

/* const iconNode = icon ? this.admonitions[type].icon; */
const admonition = this.admonitions[type];
Expand All @@ -1060,8 +1059,7 @@ ${editor.getDoc().getSelection()}\n--- admonition\n`
(admonition.injectColor ?? this.data.injectColor
? admonition.color
: null),
collapse,
id
collapse
);

let markdownRenderChild = new MarkdownRenderChild(
Expand Down Expand Up @@ -1227,8 +1225,7 @@ ${editor.getDoc().getSelection()}\n--- admonition\n`
title: string,
icon: AdmonitionIconDefinition,
color?: string,
collapse?: string,
id?: string
collapse?: string
): HTMLElement {
let admonition, titleEl;
let attrs: { style?: string; open?: string } = color
Expand Down Expand Up @@ -1265,10 +1262,6 @@ ${editor.getDoc().getSelection()}\n--- admonition\n`
});
}

if (id) {
admonition.id = id;
}

if (title && title.trim().length) {
/**
* Title structure
Expand Down

0 comments on commit 2f87101

Please sign in to comment.