0.0.1 • Published 5 years ago
modify-image-url-md v0.0.1
Modify Relative Image URLs in Markdown Text
Let suppose you have some text written in Markdown and it contains relative image urls like 
and you want to modify these urls into absolute urls like 
. Then this package will work for you.
Installation
npm i modify-image-url-md
Usage
const miu = require("modify-image-url-md");
const markdownText = `
# Hello
Just experimenting with [strapi](https://strapi.io)

## Some other image

`;
const markdownWithModifiedUrls = miu(markdownText, "https://somehost.com");
The markdownWithModifiedUrls
will contain the markdownText
but the relative image urls are now changed to absolute image urls according to the provided host
as a second parameter to miu
:
# Hello
Just experimenting with [strapi](https://strapi.io)

## Some other image

0.0.1
5 years ago