markdown-it-admon-collapsible 1.9.1 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
- # 1.9.1 (2025-12-26)
2
-
3
- - forked from markdown-it-admon
1
+ # Changelog
2
+
3
+ ## 1.9.2
4
+
5
+ 2025-12-26
6
+
7
+ - forked from markdown-it-admon
8
+
9
+ ## 1.9.3
10
+
11
+ 2025-12-27
12
+
13
+ - Changed the generated HTML to be more like markdown-it-container
package/LICENSE CHANGED
@@ -1,24 +1,24 @@
1
- Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin.
2
- Copyright (c) 2018 jebbs
3
- Copyright (c) 2021- commenthol
4
-
5
- Permission is hereby granted, free of charge, to any person
6
- obtaining a copy of this software and associated documentation
7
- files (the "Software"), to deal in the Software without
8
- restriction, including without limitation the rights to use,
9
- copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the
11
- Software is furnished to do so, subject to the following
12
- conditions:
13
-
14
- The above copyright notice and this permission notice shall be
15
- included in all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
- OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin.
2
+ Copyright (c) 2018 jebbs
3
+ Copyright (c) 2021- commenthol
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated documentation
7
+ files (the "Software"), to deal in the Software without
8
+ restriction, including without limitation the rights to use,
9
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the
11
+ Software is furnished to do so, subject to the following
12
+ conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24
+ OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,81 +1,81 @@
1
- # markdown-it-admon-collapsible
2
-
3
- > **Note:** This package is a fork of [markdown-it-admon](https://github.com/commenthol/markdown-it-admon) with added support for collapsible blocks (???), inspired by Material for MkDocs.
4
-
5
- > Plugin for creating admonitions for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
6
-
7
- With this plugin you can have collapsible admonitions:
8
-
9
- - Admonition blocks: Use !!! to create styled info/warning/note blocks
10
- - Collapsible blocks: Use ??? to create blocks with a toggle, collapsed or expanded
11
- - ???+ starts the block expanded
12
- - All admonition and collapsible types from Material for MkDocs are supported
13
- - Toggle button and styles included
14
-
15
- Examples:
16
-
17
- ```markdown
18
- !!! note
19
- This is an admonition
20
-
21
- ??? warning "Collapsible Warning"
22
- This block can be expanded/collapsed
23
-
24
- ???+ info "Expanded Info"
25
- This block starts expanded
26
- ```
27
-
28
- Markdown syntax is inspired by [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) and supports both admonition blocks (!!!) and collapsible blocks (???).
29
-
30
- [rST][] suggests the following "types": `attention`, `caution`, `danger`, `error`, `hint`, `important`, `note`, `tip`, and `warning`; however, you’re free to use whatever you want.
31
-
32
- A styles file does support the following admonition types: Credits go to [vscode-markdown-extended][].
33
-
34
- ```
35
- 'note',
36
- 'summary', 'abstract', 'tldr',
37
- 'info', 'todo',
38
- 'tip', 'hint',
39
- 'success', 'check', 'done',
40
- 'question', 'help', 'faq',
41
- 'warning', 'attention', 'caution',
42
- 'failure', 'fail', 'missing',
43
- 'danger', 'error', 'bug',
44
- 'example', 'snippet',
45
- 'quote', 'cite'
46
- ```
47
-
48
- ![](./docs/admonition-types.png)
49
-
50
- ## Installation
51
-
52
- node.js:
53
-
54
- ```bash
55
- $ npm install markdown-it-admon-collapsible --save
56
- ```
57
-
58
-
59
- ## API
60
-
61
- ```js
62
- const md = require('markdown-it')()
63
- .use(require('markdown-it-admon-collapsible') [, options]);
64
- ```
65
-
66
- Params:
67
-
68
- - __name__ - container name (mandatory)
69
- - __options?:__
70
- - __render__ - optional, renderer function for opening/closing tokens.
71
-
72
- ## License
73
-
74
- [MIT](./LICENSE)
75
-
76
- ## References
77
-
78
- * [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/)
79
- * [vscode-markdown-extended][vscode-markdown-extended]
80
- * [rST]: https://docutils.sourceforge.io/docs/ref/rst/directives.html#specific-admonitions
81
- * [vscode-markdown-extended]: https://github.com/qjebbs/vscode-markdown-extended
1
+ # markdown-it-admon-collapsible
2
+
3
+ > **Note:** This package is a fork of [markdown-it-admon](https://github.com/commenthol/markdown-it-admon) with added support for collapsible blocks (???), inspired by Material for MkDocs.
4
+
5
+ > Plugin for creating admonitions for [markdown-it](https://github.com/markdown-it/markdown-it) markdown parser.
6
+
7
+ With this plugin you can have collapsible admonitions:
8
+
9
+ - Admonition blocks: Use !!! to create styled info/warning/note blocks
10
+ - Collapsible blocks: Use ??? to create blocks with a toggle, collapsed or expanded
11
+ - ???+ starts the block expanded
12
+ - All admonition and collapsible types from Material for MkDocs are supported
13
+ - Toggle button and styles included
14
+
15
+ Examples:
16
+
17
+ ```markdown
18
+ !!! note
19
+ This is an admonition
20
+
21
+ ??? warning "Collapsible Warning"
22
+ This block can be expanded/collapsed
23
+
24
+ ???+ info "Expanded Info"
25
+ This block starts expanded
26
+ ```
27
+
28
+ Markdown syntax is inspired by [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) and supports both admonition blocks (!!!) and collapsible blocks (???).
29
+
30
+ [rST][] suggests the following "types": `attention`, `caution`, `danger`, `error`, `hint`, `important`, `note`, `tip`, and `warning`; however, you’re free to use whatever you want.
31
+
32
+ A styles file does support the following admonition types: Credits go to [vscode-markdown-extended][].
33
+
34
+ ```
35
+ 'note',
36
+ 'summary', 'abstract', 'tldr',
37
+ 'info', 'todo',
38
+ 'tip', 'hint',
39
+ 'success', 'check', 'done',
40
+ 'question', 'help', 'faq',
41
+ 'warning', 'attention', 'caution',
42
+ 'failure', 'fail', 'missing',
43
+ 'danger', 'error', 'bug',
44
+ 'example', 'snippet',
45
+ 'quote', 'cite'
46
+ ```
47
+
48
+ ![](./docs/admonition-types.png)
49
+
50
+ ## Installation
51
+
52
+ node.js:
53
+
54
+ ```bash
55
+ $ npm install markdown-it-admon-collapsible --save
56
+ ```
57
+
58
+
59
+ ## API
60
+
61
+ ```js
62
+ const md = require('markdown-it')()
63
+ .use(require('markdown-it-admon-collapsible') [, options]);
64
+ ```
65
+
66
+ Params:
67
+
68
+ - __name__ - container name (mandatory)
69
+ - __options?:__
70
+ - __render__ - optional, renderer function for opening/closing tokens.
71
+
72
+ ## License
73
+
74
+ [MIT](./LICENSE)
75
+
76
+ ## References
77
+
78
+ * [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/)
79
+ * [vscode-markdown-extended][vscode-markdown-extended]
80
+ * [rST]: https://docutils.sourceforge.io/docs/ref/rst/directives.html#specific-admonitions
81
+ * [vscode-markdown-extended]: https://github.com/qjebbs/vscode-markdown-extended