https://github.com/rumkin/iomd
Parse Mozilla's Iodide project markdown (IOMD)
https://github.com/rumkin/iomd
jsmd parser
Last synced: about 1 year ago
JSON representation
Parse Mozilla's Iodide project markdown (IOMD)
- Host: GitHub
- URL: https://github.com/rumkin/iomd
- Owner: rumkin
- License: mit
- Created: 2019-03-21T14:51:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T10:09:21.000Z (about 7 years ago)
- Last Synced: 2025-03-16T04:32:08.137Z (about 1 year ago)
- Topics: jsmd, parser
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# IOMD Parser
Mozilla's [IOMD](https://iodide-project.github.io/docs/iomd/) format standalone parser.
## Usage
```shell
npm i iomd
```
Use parser:
```javascript
const iomd = require('iomd');
const chunks = iomd.parse(`
%% markdown
# IOMD
IOMD is a text container created to mix JS, Markdown, LaTeX and any other text
format in one file. It was originally developed by Mozilla for scientific
notebooks project [Iodide](https://iodide-project.github.io).
%% js
console.log('This is a part of JS mixed with markdown');
`);
```
Method `parse` returns an array of Chunks. Each Chunk has properties `type`, `flags`,
`content`, `startLine`, `endLine` and `index`.
## License
MIT © [Rumkin](https://rumk.in)