marked-smartypants-lite

1.0.2 • Public • Published

marked-smartypants-lite

Easily translate plain ASCII punctuation characters into "smart" typographic punctuation HTML entities.

A "lite" version of marked-smartypants with the goal of maintaining high speed. Does not use the full featureset of smartypants due to high overhead slowdowns in that package, but is instead based on the faster, simpler implementation previously bundled with Marked.js < v5.0.0.

Usage

import { marked } from "marked";
import { markedSmartypantsLite } from "marked-smartypants-lite";

// 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-lite/lib/index.umd.js"></script>

marked.use(markedSmartypantsLite());

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

Dependencies (0)

    Dev Dependencies (17)

    Package Sidebar

    Install

    npm i marked-smartypants-lite

    Weekly Downloads

    2,433

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    8.49 kB

    Total Files

    7

    Last publish

    Collaborators

    • calculuschild