Skip to content

geekplux/markdown-it-fence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown-it-fence

NPM version NPM downloads Build Status codecov donate

fence customize plugin for markdown-it

Install

yarn add markdown-it-fence --save
npm install markdown-it-fence --save

Usage

const markdownitfence = require('markdown-it-fence')

function yourPlugin (md, options) {
  return markdownitfence(md, 'yourPluginName', {
    marker: yourMarker,   // default is '`'
    render: yourRender,
    validate: yourValidate
  })
}

const md = require('markdown-it')();
md.use(yourPlugin).render(`content you want to parse`)

Option params

marker

Type: string
Default: `

Marker of fence block.

render

Type: function
Default: defaultRender

Render function.

validate

Type: function
Default: defaultValidate

Validate function.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

markdown-it-fence © geekplux, Released under the MIT License.
Authored and maintained by geekplux with help from contributors (list).

github.com/geekplux · GitHub @geekplux · Twitter @geekplux

About

fence customize plugin for markdown-it

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •