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

https://github.com/uzitech/marked-linkify-it

marked using linkify-it for urls
https://github.com/uzitech/marked-linkify-it

linkify-it marked

Last synced: 2 months ago
JSON representation

marked using linkify-it for urls

Awesome Lists containing this project

README

          

# marked-linkify-it

marked using [linkify-it](https://github.com/markdown-it/linkify-it) for urls

# Usage

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

// or UMD script
//
//

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

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

marked("example.com");
//

example.com


```

## `schemas`

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

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

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

Instead do:

```JavaScript
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.