1.1.6 • Published 8 months ago

marked-base-url v1.1.6

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

marked-base-url

Prefix relative url with base url.

Usage

// ESM
import {marked} from "marked";
import {baseUrl} from "marked-base-url";

marked.use(baseUrl("https://example.com/folder/"));
const html = marked.parse("[my url](./relative/path)");
// <p><a href="https://example.com/folder/relative/path">my url</a></p>

// BROWSER
<script src="https://cdn.jsdelivr.net/npm/marked"></script>
<script src="https://cdn.jsdelivr.net/npm/marked-base-url"></script>
<script>
    marked.use(markedBaseUrl.baseUrl("https://example.com/folder/"));
    const html = marked.parse("[my url](./relative/path)");
    // <p><a href="https://example.com/folder/relative/path">my url</a></p>
</script>
1.1.6

8 months ago

1.1.5

11 months ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.2

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago