100.4.1 • Published 2 years ago
@scil/mdsplit-js v100.4.1
mdsplit-js
js port of python markusstraub/mdsplit
Extra Features
- customize the file name for each chapter (each head represents a chapter). Index can be added to file name
-cf "return `${chapter.index}-${( chapter.heading? chapter.heading.headingTitle: fallback )}` " -o output_dir "big.md" - new treatment method for the text contents under a header which has sub headers
# h1
history
## h2by default, this markdown file would be split into
- h1.md
- h1
- h2.mdbut with the extra cli option -eq, the output is
- h1
- h1.md
- h2.mdwith both options -eq and -cf
-eq -cf "return `${chapter.index}-${( chapter.heading? chapter.heading.headingTitle: fallback )}` " -l 2 -o output_dir "big.md" the output could be
- 0-h1
- 0-h1.md
- 1-h2.md