Skip to content

Commit 5752c88

Browse files
committed
6.0.2
- Removed HTML and nano-id packages
1 parent 3617e90 commit 5752c88

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-admonition",
33
"name": "Admonition",
4-
"version": "6.0.1",
4+
"version": "6.0.2",
55
"minAppVersion": "0.11.0",
66
"description": "Admonition block-styled content for Obsidian.md",
77
"author": "Jeremy Valentine",

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-admonition",
3-
"version": "6.0.1",
3+
"version": "6.0.2",
44
"description": "Admonition block-styled content for Obsidian.md",
55
"main": "main.js",
66
"scripts": {
@@ -18,11 +18,8 @@
1818
"@rollup/plugin-commonjs": "^15.1.0",
1919
"@rollup/plugin-node-resolve": "^9.0.0",
2020
"@rollup/plugin-typescript": "^6.0.0",
21-
"@types/html": "^1.0.0",
2221
"@types/node": "^14.14.2",
2322
"@types/object.fromentries": "^2.0.0",
24-
"html": "^1.0.0",
25-
"nanoid": "^3.1.23",
2623
"object.fromentries": "^2.0.4",
2724
"obsidian": "https://github.com/obsidianmd/obsidian-api/tarball/master",
2825
"rollup": "^2.32.1",

src/main.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import {
44
MarkdownRenderChild,
55
MarkdownRenderer,
66
MarkdownView,
7-
Modal,
87
Notice,
98
Plugin,
10-
Setting,
119
TFile
1210
} from "obsidian";
13-
import { prettyPrint as html } from "html";
11+
/* import { prettyPrint as html } from "html"; */
1412

1513
import { Admonition, ObsidianAdmonitionPlugin, ISettingsData } from "./@types";
1614
import {
@@ -258,7 +256,7 @@ export default class ObsidianAdmonition
258256
}
259257
}
260258
});
261-
this.addCommand({
259+
/* this.addCommand({
262260
id: "replace-with-html",
263261
name: "Replace Admonitions with HTML",
264262
callback: async () => {
@@ -326,7 +324,7 @@ export default class ObsidianAdmonition
326324
);
327325
ensure.open();
328326
}
329-
});
327+
}); */
330328

331329
this.addCommand({
332330
id: "insert-admonition",

src/util/util.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import { MarkdownRenderer, Notice } from "obsidian";
22

3-
import { nanoid } from "nanoid";
3+
/* import { nanoid } from "nanoid"; */
44

55
import { getIconNode } from "./icons";
66
import { AdmonitionIconDefinition, INestedAdmonition } from "../@types";
77

88
export function getID() {
9-
return `ID_${nanoid()}`;
9+
return "ID_xyxyxyxyxyxy".replace(/[xy]/g, function (c) {
10+
var r = (Math.random() * 16) | 0,
11+
v = c == "x" ? r : (r & 0x3) | 0x8;
12+
return v.toString(16);
13+
});
1014
}
1115

1216
export function getMatches(

versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"4.3.1": "0.12.0",
1212
"4.4.2": "0.12.2",
1313
"5.0.3": "0.12.2",
14-
"6.0.1": "0.12.4"
14+
"6.0.2": "0.12.4"
1515
}

0 commit comments

Comments
 (0)