🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

marked-base-url

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marked-base-url

marked base url

latest
Source
npmnpm
Version
1.1.9
Version published
Weekly downloads
18K
-24.93%
Maintainers
1
Weekly downloads
 
Created
Source

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>

Keywords

marked

FAQs

Package last updated on 07 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts