1.0.3 • Published 9 months ago
@anthonypena/marked-inline-ascii-punctuation v1.0.3
@anthonypena/marked-inline-ascii-punctuations
Install
npm i @anthonypena/marked-inline-ascii-punctuations
Examples
Add the plugin to your Marked instance
import { markedInlineAsciiPunctuations } from '@anthonypena/marked-inline-ascii-punctuations';
import { Marked } from 'marked';
const marked = new Marked();
marked.use(markedInlineAsciiPunctuations());
Transformation
From:
This is a sentence... with an -- exergue.
to:
<p>This is a sentence… with an — exergue.</p>
Docs
Supported punctuations:
- ' -- ' ⟹ ' — '
- ' --- ' ⟹ ' — '
- '...' ⟹ '…'