markly
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Markly

A micro subset of Markdown.

Installing

Using npm:

$ npm i markly

Usage

import markly from "markly";

const html = markly("*Hello*");
// html -> "<p><strong>Hello</strong></p>"

Differences with Markdown

  1. Markly only support paragraphs, non-nested unordered lists, and bold text.
  2. Markly will always translate line breaks to <br> tags.
  3. No support for embedding arbitrary HTML.

These limitations are in place by design and there are no plans for supporting additional features.

Use cases

  • Product descriptions
  • Chat UIs
  • Places where basic formatting of user generated content is needed, without the risk of breaking the UI/layout.

Readme

Keywords

Package Sidebar

Install

npm i markly

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

23.6 kB

Total Files

27

Last publish

Collaborators

  • ramontorres