0.1.3 • Published 5 months ago

markdown-it-typograf v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

📃 markdown-it-typograf

Tiny markdown-it plugin, with typograf integration.

Check demo.

Setup

npm install markdown-it-typograf

Usage

import markdownit from "markdown-it";
import markdownitTypograf from "markdown-it-typograf";

const md = markdownit().use(markdownitTypograf, {
  // ...options
});
console.log(md.render('"Привет"')); // <p>«Привет»</p>\n

Options

OptionDefaultDescription
typografOptions{ locale: 'ru' }Options passed to typograf.
typografSetupundefinedFunction to customize typograf programmatically.

Example

const md = markdownit().use(markdownitTypograf, {
  typografOptions: {
    locale: "ru",
    disableRule: "*",
  },
  typografSetup(tp) {
    tp.enableRule("common/number/mathSigns");
  },
});
console.log(md.render("0 != 1")); // <p>0 ≠ 1</p>\n

Development

bun install
bun run dev
0.1.3

5 months ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.0

1 year ago