2.0.0 • Published 5 years ago

hakkamd v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Travis (.org) codecov npm npm NPM

HakkaMD

A tiny & basic Markdown engine for both browser and Node.

Installation and Usage

  1. npm i hakkamd
  2. const hakkamd = require('hakkamd') / import * as hakkamd from 'hakkamd'
  3. 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:

![url](text) (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!
2.0.0

5 years ago

0.9.5

5 years ago