html-from-md
v1.0.0
Published
A simple TypeScript library that formats Markdown and returns a formatted HTML.
Maintainers
Readme
html-from-md
A simple TypeScript library that formats Markdown and returns a formatted HTML.
Usage
const { html, links } = formatMarkdown(mdFile)
| Option | Description
|--------------------------------------------------------------|---------------------------------------------------
| formatMarkdown(mdFile, { keepSections: ["Features"] }) | keeps only specified section
| formatMarkdown(mdFile, { excludeSections: ["License"] }) | excludes a section
| formatMarkdown(mdFile, { gfm: true }) | applies GitHub-Flavored Markdown
| formatMarkdown(mdFile, { useImgAltText: true }) | replaces images with alt text
| formatMarkdown(mdFile, { maxChars: 50 }) | truncates output when maxChars is set
| formatMarkdown(mdFile, { removeImages: true }) | removes images
Installation
$ npm install html-from-mdContributing
- Fork this repo
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
