Socket
Socket
Sign inDemoInstall

@beneb/remark-behead

Package Overview
Dependencies
4
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @beneb/remark-behead

Add or remove heading levels


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
84.3 kB
Created
Weekly downloads
 

Readme

Source

.

behead Build Status

Behead is a remark plugin to increase and decrease the weight of markdown headings. Passing a negative value to the weight option will decrease the heading weight. Passing a positive value to the weight option will increase the heading weight

install

npm install [ --save ] @ben-eb/remark-behead
then
import behead from 'remark-behead'

Meta

  • version: 1.5.2
  • author: mrzmmr

options

Properties

options.after

Manipulates heading nodes after but not including the given string. Note: When using this option, behead will start working after the first occurrence of the given string.

Examples

remark.use(behead, {weight: 1, after: '# After this'})
  .process('# After this\n## Hello\n## World')

  => '# After this\n# Hello\n# World\n'

options.before

Manipulates heading nodes before but not including the given string. Note: When using this option, behead will stop working at the first occurrence of the given string.

Examples

remark.use(behead, {weight: 1, before: '# Before this'})
  .process('# Hello\n# World\n# Before this')

  => '## Hello\n## World\n# Before this\n'

options.between

Manipulates heading nodes between but not including the two given strings, starting with options.between[0] and ending with options.between[1].

Examples

remark(behead, {weight: 1, between: ['# Hello', '# World']})
  .process('# Hello\n# Between\n# World')

  => '# Hello\n## Between\n# World\n'

Keywords

FAQs

Last updated on 16 Dec 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc