@olets/markdown-it-wrapperless-fence-rule
v1.2.1
Published
markdown-it plugin for a fence rule with no wrapper
Downloads
295
Readme
@olets/markdown-it-wrapperless-fence-rule
markdown-it
plugin for a fence rule with no wrapper.
By default, markdown-it
will always wrap rendered fenced code in <pre><code>
. That's a good default: it turns
```js
…
```
into
<pre>
<code>
…
</code>
</pre>
But that's not the behavior you want if you're using a fenced code processor which adds the <pre><code>
wrappers for you, or if you don't want <pre><code>
wrappers at all.
Installation
<package manager> add [-D] @olets/markdown-it-wrapperless-fence-rule
Usage
import markdownItWrapperlessFenceRule from '@olets/markdown-it-wrapperless-fence-rule';
import MarkdownIt from 'markdown-it';
const md = MarkdownIt();
md.renderer.rules.fence = markdownItWrapperlessFenceRule;
md.use(/* … */);
Contributing
Thanks for your interest. Contributions are welcome!
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Check the Issues to see if your topic has been discussed before or if it is being worked on.
Please read CONTRIBUTING.md before opening a pull request.
License
See LICENSE.