Skip to content

Jabberwocky238/jw-micromark-toolbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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]

About

micromark extension for multiple usage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published