Socket
Socket
Sign inDemoInstall

remarkable-admonitions

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

13

CHANGELOG.md

@@ -0,1 +1,14 @@

## [0.2.2](https://github.com/favoloso/remarkable-admonitions/compare/v0.2.1...v0.2.2) (2020-01-14)
### ๐Ÿ› Bug Fixes
* Parse admonitions within lists ([5d70c74](https://github.com/favoloso/remarkable-admonitions/commit/5d70c74)), closes [#26](https://github.com/favoloso/remarkable-admonitions/issues/26)
### ๐Ÿ“š Documentation
* Add example for custom title and types ([21b22f3](https://github.com/favoloso/remarkable-admonitions/commit/21b22f3))
## [0.2.1](https://github.com/favoloso/remarkable-admonitions/compare/v0.2.0...v0.2.1) (2019-03-13)

@@ -2,0 +15,0 @@

2

lib/parser.js

@@ -15,3 +15,3 @@ "use strict";

const parser = (state, startLine, endLine, silent) => {
let pos = state.bMarks[startLine] + state.blkIndent;
let pos = state.bMarks[startLine] + state.tShift[startLine];
const max = state.eMarks[startLine]; // Not enough chars or ending line with `:::`.

@@ -18,0 +18,0 @@

@@ -30,2 +30,20 @@ "use strict";

});
test('should render a callout within a list', () => {
md.use((0, _.default)());
expect(md.render(`- A list\n\n :::note\n Info\n ABC\n :::\n`)).toMatchInlineSnapshot(`
"<ul>
<li><p>A list</p>
<div class=\\"admonition admonition-note\\">
<div class=\\"admonition-heading\\">
<h5><div class=\\"admonition-icon\\">โ„น๏ธ</div> note</h5>
</div>
<div class=\\"admonition-content\\">
<p>Info</p>
<p>ABC</p>
</div></div></li>
</ul>
"
`);
});
test('should ignore content after callout', () => {

@@ -32,0 +50,0 @@ md.use((0, _.default)());

{
"name": "remarkable-admonitions",
"version": "0.2.1",
"version": "0.2.2",
"description": "A remarkable plugin to add admonitions support",

@@ -5,0 +5,0 @@ "repository": "https://github.com/favoloso/remarkable-admonitions.git",

@@ -7,3 +7,3 @@ # remarkable-admonitions

Adds admonitions parsing support to Remarkable
Adds admonitions parsing support to Remarkable. (There's also a [React component](https://github.com/nebrelbug/react-admonitions))

@@ -52,2 +52,14 @@ <img src="assets/preview.png" width="680" />

Supported admonition types are: `caution`, `note`, `important`, `tip`,
`warning`.
By default block title is the admonition type. You can provide a custom title
after the opening tag:
```md
:::note This is my custom title
A note.
:::
```
### With Docusaurus

@@ -54,0 +66,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc