emapi v2.0.2
const parse = require('mapi');
const ast = parse(`
# Hello! I am Mapi!
> A fast, minimalistic and reliable Markdown parser.
`);
Table of Contents
Installation
NPM is the node package manager, so make sure you have it and node.js installed.
Clone the repository and change the directory of your terminal to the downloaded folder.
$ git clone https://github.com/Infotition/emapi.git
$ cd codeli
Install all packages using the npm install
command.
$ npm install
Now everything should be working fine. If you have any problems, don't hesitate to join our official discord server.
Features
- Parse complete markdown files or markdown strings
- Focus on high performance
- Parses the markdown content to an easy to use json file
- Supports more blocks especially for scientific writing
- Super-high test coverage
Examples
const parse = require('mapi');
const ast = parse(`
# Hello! I am Mapi!
> A fast, minimalistic and reliable Markdown parser.
> I understand markdown Syntax.
> **But also more components especially for scientific writing**
$$
f(x_{mapi}) = \text{Super awesome}.
$$
`);
console.log(ast)
Output:
[
{ type: 'heading', value: { level: 1, title: 'Hello! I am Mapi!' } },
{
type: 'blockquote',
value: [
{
type: 'paragraph',
value: [
{
type: 'text',
value: 'A fast, minimalistic and reliable Markdown parser.'
}
]
},
{
type: 'paragraph',
value: [ { type: 'text', value: 'I understand markdown Syntax.' } ]
},
{
type: 'paragraph',
value: [
{
type: 'bold',
value: 'But also more components especially for scientific writing'
}
]
}
]
},
{
type: 'mathblock',
value: ' f(x_{mapi}) = \\text{Super awesome}.'
}
]
To view more examples, clone the repository, go to the examples directory and install the dependencies:
$ git clone https://github.com/Infotition/emapi.git
$ cd emapi/examples
$ npm install
Then run the example you want (replace with the number of the example):
$ node example_<num>.js
Issue Reporting
If you have found a bug or if you have a feature request, please report them at this repository issues section. For other related questions/support please use the official Infotition Discord server.
Contribution
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
License
This repo is covered under the MIT License, see the LICENSE file for more information.