1.0.1 • Published 3 years ago

@compilelife/reheader v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

这是一个用于给markdown文件的标题自动编号的工具

This is a handy tool to smartly add chapter numbers to markdown headers

Usage

你可以把它当shell工具使用:

You can use it as a shell tool

npm i -g @compilelife/reheader

reheader /path/to/your/file.md

或者是用在项目里

or, in project:

npm i -S @compilelife/reheader
const reheader = require('@compilelife/reheader')

console.log(reheader('# h1'))
//# 1. h1

Todo

  • support Setext-style headers
  • support various number style
  • plugin for vscode