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

1.1.6 • Public • Published

marked-smartypants

Use smartypants to easily translate plain ASCII punctuation characters into "smart" typographic punctuation HTML entities.

Usage

import { marked } from "marked";
import { markedSmartypants } from "marked-smartypants";

// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/marked-smartypants/lib/index.umd.js"></script>

marked.use(markedSmartypants());

// or optionally provide smartpants configuration
// marked.use(markedSmartypants({ config: "1" }));

marked.parse("He said, -- \"A 'simple' sentence. . .\" --- unknown");
// <p>He said, – “A ‘simple’ sentence…” — unknown</p>

Information on available smartypants configurations is available here.

Package Sidebar

Install

npm i marked-smartypants

Weekly Downloads

4,598

Version

1.1.6

License

MIT

Unpacked Size

51 kB

Total Files

8

Last publish

Collaborators

  • tonybrix