You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
414 B

  1. const mdExpandTabs = require('markdown-it-expand-tabs')
  2. const _ = require('lodash')
  3. // ------------------------------------
  4. // Markdown - Expand Tabs
  5. // ------------------------------------
  6. module.exports = {
  7. key: 'markdown/expand-tabs',
  8. title: 'Expand Tabs',
  9. dependsOn: [],
  10. props: ['tabWidth'],
  11. init (md, conf) {
  12. md.use(mdExpandTabs, {
  13. tabWidth: _.toInteger(conf.tabWidth || 4)
  14. })
  15. }
  16. }