Skip to content

raymondjavaxx/markly

Repository files navigation

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.