Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 1.61 KB

README.md

File metadata and controls

66 lines (41 loc) · 1.61 KB

@jotdoc/unify npm

Unifies []() to work on text, images, and links! Arguments alone are how elements differentiate
—for the markdown-it parser.

❗⠀This plugin belongs to a family of experimental features called Jotdoc: a "flavor" of Markdown aiming to maximize readability and extend markup for common use cases where verbose HTML is required.

If you're interested, please do share your thoughts and check out the monorepo!

Demo

[] selects content; () are its attributes, like color:

[Very [cool](blue), wow](red)

And links are really just text:

[It's that easy!](https://scam.net green)

Image sizes are attributes, too:

[Something](.embed/idk.png 60px)

Enable

const md = require('markdown-it')()

      md.use(require('@jotdoc/unify'))

Options

Define your own colors or override HTML defaults:

...
const unify = require('@jotdoc/unify')
md.use(unify))

unify.userColor.push({
  name: 'pale',
  color: '#ddf'
})