npm install jw-micromark-toolbox
https://github.com/Jabberwocky238/jw-micromark-toolbox
[micromark][] extensions to support Obsidian asset & link.
import {micromark} from 'micromark'
import {jwObsidian, jwObsidianHtml} from 'jw-micromark-toolbox'
micromark("your input", {
extensions: [jwObsidian()],
htmlExtensions: [jwObsidianHtml({
linkprefix: "assets"
})]
})
[[this is a link]]
![[this is an image.png]]
==this is highlight (mark)==
[modified link](/blog/or/may/be/not/blog)
Yields:
<p><a href="/this is a link.md">this is a link</a></p>
<p><img src="/this is an image.png" alt="/this is an image.png"></img></p>
<p><mark>this is highlight (mark)</mark></p>
<p><a href="/assets/blog/or/may/be/not/blog">modified link</a></p>
[MIT][license]