Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
- Admonitions must be prefixed by "ad-" now to prevent collisions with other plugins.
  • Loading branch information
valentine195 committed Mar 31, 2021
1 parent 190601f commit 0fb4f3d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```
````
Expand All @@ -21,7 +21,7 @@ Becomes:
## Options

````markdown
```<type> # Admonition type. See below for a list of available types.
```ad-<type> # 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.
Expand All @@ -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.
```
Expand All @@ -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.
```
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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",
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": "obsidian-admonition",
"version": "1.0.1",
"version": "2.0.0",
"description": "Admonition block-styled content for Obsidian.md",
"main": "main.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 0fb4f3d

Please sign in to comment.