@rokelamen/md2html
v0.2.1
Published
A simple tool to convert Markdown content to HTML
Readme
md2html
A simple markdown-html converter written in Typescript.
The style relies on browser pure style, inspired by txti.
Goal
I create this project for learning TS and node dev, not for the purpose of building another better markdown parse engine.
Markdown syntax was first promoted with the release of markdown.pl by John Gruber. This leads to Markdown has no explicit definition, which means how markdown is parsed to HTML highly depends on the implementation of the tool. And I choose a simplest way(line-by-line parsing)
To stay as close as possible to the 'Standard Markdown', CommonMark is a great reference.
Requirement
Node environment(>= v12.0.0) is necessary.
Installation
Using npm:
npm i -g @rokelamen/md2htmlUsage
As a command-line
md2html [options] [input]- Parse from/to stdio
md2html "# Markdown content" > index.html- Parse from/to file
md2html -f input.md -o index.htmlAs a library
import { parse } from '@rokelamen/md2html';Development
For development logs, please refer to the Development Log.
