An open API service indexing awesome lists of open source software.

https://github.com/markedjs/marked-smartypants


https://github.com/markedjs/marked-smartypants

Last synced: 6 months ago
JSON representation

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).