sfm-js/README.md
2020-02-24 22:27:01 +09:00

44 lines
695 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# mfm-parser-pegjs
## Description
A MFM parser made with PEG.js (In developing)
## Installation
```
npm i mfm-parser-pegjs
```
## Usage
```ts
import * as mfm from 'mfm-parser-pegjs';
// parse a MFM text
const result = mfm.parse('good morning ***everyone!***');
// parse a MFM plain text
const plainResult = mfm.parsePlain('I like the hot soup :soup:');
```
## 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
This software is released under the [MIT License](LICENSE).