https://github.com/markedjs/marked-smartypants
https://github.com/markedjs/marked-smartypants
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/markedjs/marked-smartypants
- Owner: markedjs
- License: mit
- Created: 2023-04-02T07:10:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-16T03:44:46.000Z (7 months ago)
- Last Synced: 2025-06-16T04:55:02.589Z (7 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/marked-smartypants
- Size: 2.3 MB
- Stars: 6
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# marked-smartypants
Use [smartypants](https://www.npmjs.com/package/smartypants) to easily translate plain ASCII punctuation characters into "smart" typographic punctuation HTML entities.
# Usage
```js
import { marked } from "marked";
import { markedSmartypants } from "marked-smartypants";
// or UMD script
//
//
marked.use(markedSmartypants());
// or optionally provide smartpants configuration
// marked.use(markedSmartypants({ config: "1" }));
marked.parse("He said, -- \"A 'simple' sentence. . .\" --- unknown");
//
He said, – “A ‘simple’ sentence…” — unknown
```
Information on available smartypants configurations is available [here](https://github.com/othree/smartypants.js#options-and-configuration).