2.0.0 • Published 5 years ago
hakkamd v2.0.0
HakkaMD
A tiny & basic Markdown engine for both browser and Node.
Installation and Usage
npm i hakkamd
const hakkamd = require('hakkamd')
/import * as hakkamd from 'hakkamd'
const html = hakkamd.parse('YOUR MARKDOWN INPUT GOES HERE');
Syntax
Plain text:
text
— plain text or HTML <p></p>
Bold:
*text*
(HTML <b></b>
)
Italic:
_text_
(HTML <i></i>
)
Strikethrough:
~text~
(HTML <s></s>
)
Headings:
# Text
(the number of sharp symbols corresponds the HTML heading, from <h1>
to <h6>
)
Blockquote:
> text
Code samples:
`text` — HTML <code> tag.
```
text — HTML <pre> tag.
```
Spoilers:
@text@
(HTML <span class="spoiler"></span>
)
Unordered list:
- one
- two
- three
Ordered list:
1. one
1. two # the starting number can be any from 0 to 9
1. three
Image:

(HTML <img src="url" alt="text"/>
)
Hyperlink:
[url](text)
(HTML <a href="url">text</a>
)
Development and Contribution:
Please take note that this project utilizes commitizen
for commits, so use npm run cz
instead of git commit
. Also the ghooks
are setup to run linting and tests before each commit.
TODO:
- Add tests
- Add build process
- Make it available both for Node and browser
- Write docs
- ?????
- PROFIT!