mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-24 23:15:14 +00:00
41 lines
536 B
Markdown
41 lines
536 B
Markdown
# mfm-parser-pegjs
|
|
## Description
|
|
A MFM parser made with PEG.js (In developing)
|
|
|
|
## Installation
|
|
```
|
|
npm i mfm-parser-pegjs
|
|
```
|
|
|
|
## Usage
|
|
```ts
|
|
import { parse } from 'mfm-parser-pegjs';
|
|
|
|
// parse a MFM code
|
|
const result = parse('this is a ***MFM text***');
|
|
```
|
|
|
|
## Usage (Repository)
|
|
### 1. Clone
|
|
```
|
|
git clone https://github.com/marihachi/mfm-parser-pegjs.git
|
|
```
|
|
|
|
### 2. Build
|
|
For production:
|
|
```
|
|
npm run build
|
|
```
|
|
|
|
For development:
|
|
```
|
|
npm run build-dev
|
|
```
|
|
|
|
### Use Interactive interface
|
|
```
|
|
npm run parse
|
|
```
|
|
|
|
## License
|
|
MIT
|