From 0fb4f3d52dbbee56a64afbe67ccea5cc1e546e62 Mon Sep 17 00:00:00 2001 From: valentine195 <38669521+valentine195@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:50:00 -0400 Subject: [PATCH] 2.0.0 - Admonitions must be prefixed by "ad-" now to prevent collisions with other plugins. --- README.md | 12 ++++++++---- manifest.json | 2 +- package.json | 2 +- src/main.ts | 3 ++- versions.json | 3 ++- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c4b326b..4cb3b31 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Adds admonition block-styled content to Obsidian.md, styled after [Material for Place a code block with the admonition type: ````markdown -```note +```ad-note Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. ``` ```` @@ -21,7 +21,7 @@ Becomes: ## Options ````markdown -``` # Admonition type. See below for a list of available types. +```ad- # Admonition type. See below for a list of available types. title: # Admonition title. collapse: # Create a collapsible admonition. content: # Actual text of admonition. Only required if "title" or "collapse" is used. @@ -39,7 +39,7 @@ Content is the actual text of the admonition. The admonition will render with the type of admonition by default. If you wish to customize the title, you can do so this way: ````markdown -```note +```ad-note title: Title content: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. ``` @@ -50,7 +50,7 @@ content: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euism Leave the title field blank to only display the admonition. ````markdown -```note +```ad-note title: content: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. ``` @@ -228,6 +228,10 @@ An icon without a title will have this CSS: # Version History +## 2.0.0 + +- To maintain compatibility with other plugins, admonition types must now be prefixed with `ad-` (as in, `ad-note`). + ## 1.0.0 - Community plugin release diff --git a/manifest.json b/manifest.json index 655b6df..26b2077 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-admonition", "name": "Admonition", - "version": "1.0.1", + "version": "2.0.0", "minAppVersion": "0.11.0", "description": "Admonition block-styled content for Obsidian.md", "author": "Jeremy Valentine", diff --git a/package.json b/package.json index d9ca58c..21e80c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-admonition", - "version": "1.0.1", + "version": "2.0.0", "description": "Admonition block-styled content for Obsidian.md", "main": "main.js", "scripts": { diff --git a/src/main.ts b/src/main.ts index 490f594..da4e24e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -54,10 +54,11 @@ export default class ObsidianAdmonition extends Plugin { Object.keys(ADMONITION_MAP).forEach((type) => this.registerMarkdownCodeBlockProcessor( - type, + `ad-${type}`, this.postprocessor.bind(this, type) ) ); + } postprocessor( type: string, diff --git a/versions.json b/versions.json index f8cc1a9..1ad0dee 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,5 @@ { "0.2.3": "0.11.0", - "1.0.1": "0.11.0" + "1.0.1": "0.11.0", + "2.0.0": "0.11.0" }