Package Exports
- markdown-it-codetabs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (markdown-it-codetabs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
markdown-it-codetabs
Code tabs plugin for markdown-it markdown parser.
Install
npm install markdown-it-codetabs --save
Use
var md = require('markdown-it')()
.use(require('markdown-it-codetabs'));
md.render(markdownContent);
// Continuous code block with the same
// group markder (`[marker]`) will rendered to a tab.
Example
Normal code block:
```python print("hello") ``` ```js console.log("hello"); ```
Rendered to one block with two tabs (the tab name is language name):
```python [] print("hello") ``` ```js [] console.log("hello"); ```
Rendered to two blocks with one tab separately (the content in square brackets doesn't matter as long as they are different):
```python [1] print("hello") ``` ```js [2] console.log("hello"); ```