Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.15 KB

readme.md

File metadata and controls

55 lines (37 loc) · 1.15 KB

jw-micromark-toolbox

npm install jw-micromark-toolbox

https://github.com/Jabberwocky238/jw-micromark-toolbox

[micromark][] extensions to support Obsidian asset & link.

Use

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>

Thanks

License

[MIT][license]