marked-smartypants

marked extension for smartypants

MIT 19 个版本
安装
npm install marked-smartypants
yarn add marked-smartypants
pnpm add marked-smartypants
bun add marked-smartypants
README

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.

版本列表
1.1.12 2026-04-07
1.1.11 2025-11-07
1.1.10 2025-06-27
1.1.9 2024-11-09
1.1.8 2024-08-07
1.1.7 2024-06-12
1.1.6 2024-02-06
1.1.5 2023-11-30
1.1.4 2023-11-11
1.1.3 2023-09-11
1.1.2 2023-09-03
1.1.1 2023-09-03
1.1.0 2023-08-19
1.0.5 2023-08-10
1.0.4 2023-08-07
1.0.3 2023-08-05
1.0.2 2023-05-12
1.0.1 2023-05-07
1.0.0 2023-04-02