@sombian/markdown
v1.2.1
Published
[![npm](https://badgen.net/npm/v/@sombian/markdown)](https://www.npmjs.com/package/@sombian/markdown) [![hits](https://hits.sh/github.com/Sombian/markdown.svg)](https://hits.sh/github.com/Sombian/markdown) [![downloads](https://badgen.net/npm/dt/@sombian/
Downloads
157
Readme
@sombian/markdown
npm i @sombian/markdown
@sombian/markdown is my take on modernizing markdown syntax.
this project focuses on high performance, modularity, and, above all, simplicity.
Usage
this project is under active development and not yet suitable for production use.
import { Presets } from "@sombian/markdown";
const helper = Presets.NekoNote;
console.debug(helper.run("hello world"));
// or helper.parse(helper.scan("hello world"))
NekoNote
whilst NekoNote builds on existing markdown grammars, it differs from regular markdown in several ways. also, rather than offering a universal solution, it serves as a template that illustrates how to write your own preset.
please be aware that NekoNote does not support every feature specified in the markdown spec, nor does it provide its own formal spec yet. these will be available after the project reaches the ready-for-production stage.
Escape
# hello \*world*
->
["H1", "hello", "SPACE", "*world", "ITALIC", "BREAK"]
->
<h1>hello *world</h1>
Comment
/* comment */
->
["COMMENT_L", "SPACE", "comment", "SPACE", "COMMENT_R", "BREAK"]
->
Heading 1
# hello world
->
["H1", "hello", "SPACE", "world", "BREAK"]
->
<h1>hello world</h1>
Heading 2
## hello world
->
["H2", "hello", "SPACE", "world", "BREAK"]
->
<h2>hello world</h2>
Heading 3
### hello world
->
["H3", "hello", "SPACE", "world", "BREAK"]
->
<h3>hello world</h3>
Heading 4
#### hello world
->
["H4", "hello", "SPACE", "world", "BREAK"]
->
<h4>hello world</h4>
Heading 5
##### hello world
->
["H5", "hello", "SPACE", "world", "BREAK"]
->
<h5>hello world</h5>
Heading 6
###### hello world
->
["H6", "hello", "SPACE", "world", "BREAK"]
->
<h6>hello world</h6>
Horizontal Rule
___
---
===
->
["HR_1", "HR_2", "HR_3"]
->
<hr/><hr/><hr/>
...and more