@anthonypena/marked-inline-ascii-punctuation
v1.0.3
Published
Plugin to replace some ascii sequence to equivalent punctuation.
Downloads
6
Readme
@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:
- ' -- ' ⟹ ' — '
- ' --- ' ⟹ ' — '
- '...' ⟹ '…'