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
- Host: GitHub
- URL: https://github.com/uzitech/marked-linkify-it
- Owner: UziTech
- License: mit
- Created: 2021-01-21T16:01:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-10T08:56:20.000Z (over 1 year ago)
- Last Synced: 2025-03-10T09:45:34.430Z (over 1 year ago)
- Topics: linkify-it, marked
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/marked-linkify-it
- Size: 6.85 MB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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");
//
```
## `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.