New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

markdown-it-book-plugin

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

markdown-it-book-plugin

---------------

unpublished
latest
npmnpm
Version
3.10.1
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

markdown-it-book-plugin

A markdown-it plugin for book or thesis writers.

Features

  • Auto numbered images
  • Auto numbered tables
  • Auto numbered headings
  • Auto numbered images made by mermaid source code

Installation

yarn add markdown-it-book-plugin

Usage

Basic:

const MarkdownIt = require("markdown-it");
const md = new MarkdownIt();

md.use(require('markdown-it-book-plugin'));

Advanced with options

If you want to prepend the chapter number to the heading, you can use the following options:

const MarkdownIt = require("markdown-it");
const md = new MarkdownIt();

md.use(require('markdown-it-book-plugin'), {
    mainCounterTag: 'h3',
    updateMainCounter: true,
});

You can even customize the counter for each heading, for example, skip the first two chapters:

const MarkdownIt = require("markdown-it");
const md = new MarkdownIt();

md.use(require('markdown-it-book-plugin'), {
    mainCounterTag: 'h3',
    updateMainCounter: ['', '', 1, 2, 3, 4],
});

More examples see

  • test cases
  • live example

Who is using?

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'feat: add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request :D

💵 Questions

Feel free to contact me, I'd love to help.

向我咨询

FAQs

Package last updated on 10 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts