remarkable-admonitions
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -0,1 +1,10 @@ | ||
## [0.2.1](https://github.com/favoloso/remarkable-admonitions/compare/v0.2.0...v0.2.1) (2019-03-13) | ||
### 📚 Documentation | ||
* Fix default icon-renderer ([79491ef](https://github.com/favoloso/remarkable-admonitions/commit/79491ef)) | ||
* Fix npm badge ([82eb9ef](https://github.com/favoloso/remarkable-admonitions/commit/82eb9ef)) | ||
# [0.2.0](https://github.com/favoloso/remarkable-admonitions/compare/v0.1.1...v0.2.0) (2019-03-13) | ||
@@ -2,0 +11,0 @@ |
@@ -149,2 +149,35 @@ "use strict"; | ||
}); | ||
describe('icon renderer', () => { | ||
test('should throw if invalid icon renderer is selected', () => { | ||
md.use((0, _.default)({ | ||
icon: 'whaaat' | ||
})); | ||
expect(() => { | ||
md.render(_dedent.default` | ||
:::caution | ||
Message | ||
::: | ||
`); | ||
}).toThrow(); | ||
}); | ||
test('should allow svg rendering', () => { | ||
md.use((0, _.default)({ | ||
icon: 'svg-inline' | ||
})); | ||
expect(md.render(_dedent.default` | ||
:::caution | ||
Message | ||
::: | ||
`)).toMatchInlineSnapshot(` | ||
" | ||
<div class=\\"admonition admonition-caution\\"> | ||
<div class=\\"admonition-heading\\"> | ||
<h5><div class=\\"admonition-icon\\"><svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"12\\" height=\\"16\\" viewBox=\\"0 0 12 16\\"><path fill-rule=\\"evenodd\\" d=\\"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z\\"/></svg></div> caution</h5> | ||
</div> | ||
<div class=\\"admonition-content\\"> | ||
<p>Message</p> | ||
</div></div>" | ||
`); | ||
}); | ||
}); | ||
}); |
{ | ||
"name": "remarkable-admonitions", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A remarkable plugin to add admonitions support", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/favoloso/remarkable-admonitions.git", |
@@ -5,3 +5,3 @@ # remarkable-admonitions | ||
[![Codecov](https://img.shields.io/codecov/c/github/favoloso/remarkable-admonitions.svg)](https://codecov.io/gh/favoloso/remarkable-admonitions) | ||
[![npm](https://img.shields.io/npm/v/remarkable-admonitions.svg)](https://www.npmjs.com/package/remarkable-admonitions) | ||
[![npm](https://img.shields.io/npm/v/remarkable-admonitions.svg?style=popout)](https://www.npmjs.com/package/remarkable-admonitions) | ||
@@ -76,4 +76,4 @@ Adds admonitions parsing support to Remarkable | ||
| Option | Default | Description | | ||
| ---------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| **`icon`** | `svg-inline` | Allows to use a different method to render admonition icons. By default it uses `svg-inline` with [Octicons](https://octicons.github.com) icons. Choose `emoji` to use Emojis instead. | | ||
| Option | Default | Description | | ||
| ---------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| **`icon`** | `emoji` | Allows to use a different method to render admonition icons. By default it uses `emoji` (unicode Emojis). Choose `svg-inline` to use [Octicons](https://octicons.github.com). | |
26409
432