3.1.12 • Published 8 months ago

marked-linkify-it v3.1.12

Weekly downloads
7
License
MIT
Repository
github
Last release
8 months ago

marked-linkify-it

marked using linkify-it for urls

Usage

import { marked } from "marked";
import markedLinkifyIt from "marked-linkify-it";

// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/marked-linkify-it/lib/index.umd.js"></script>

const schemas = {};
const options = {};

marked.use(markedLinkifyIt(schemas, options));

marked("example.com");
// <p><a href="http://example.com">example.com</a></p>

schemas

see https://github.com/markdown-it/linkify-it#api

Note: #add() doesn't work with this extension

markedLinkifyIt.add('@', {...}) // Doesn't work, you need to pass a schema manually

Instead do:

const schemas = {
	'@': {
		validate: function (text, pos, self) {
			// ...
		},
		normalize: function (match) {
			// ...
		}
	}
};

options

see https://github.com/markdown-it/linkify-it#api

linkify options plus the following additional options:

tlds

String|String[]

replace or add tlds for fuzzy links/

tldsKeepOld

Boolean; Default: false

true to add domains instead of replacing domain list.

3.1.12

8 months ago

3.1.11

11 months ago

3.1.10

1 year ago

3.1.9

1 year ago

3.1.8

2 years ago

3.1.7

2 years ago

3.1.6

2 years ago

3.1.5

2 years ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.4

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.0

3 years ago

1.1.3

3 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago