Socket
Socket
Sign inDemoInstall

remark-message-control

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-message-control - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

7

index.js

@@ -9,4 +9,9 @@ 'use strict'

var test = [
'html', // Comments are `html` nodes in mdast.
'comment' // In MDX, comments have their own node.
]
function messageControl(options) {
return control(xtend({marker: marker, test: 'html'}, options))
return control(xtend({marker: marker, test: test}, options))
}

21

package.json
{
"name": "remark-message-control",
"version": "4.1.1",
"description": "Enable, disable, and ignore messages with remark",
"version": "4.2.0",
"description": "remark plugin to enable, disable, and ignore messages with remark",
"license": "MIT",
"keywords": [
"unified",
"remark",
"plugin",
"mdast",
"markdown",
"comment",

@@ -17,3 +21,4 @@ "message",

"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"Christian Murphy <christian.murphy.42@gmail.com>"
],

@@ -30,11 +35,11 @@ "files": [

"browserify": "^16.0.0",
"nyc": "^13.0.0",
"prettier": "^1.14.2",
"nyc": "^14.0.0",
"prettier": "^1.0.0",
"remark": "^10.0.0",
"remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"remark-preset-wooorm": "^5.0.0",
"remark-toc": "^5.0.0",
"tape": "^4.0.0",
"tinyify": "^2.4.3",
"xo": "^0.23.0"
"tinyify": "^2.0.0",
"xo": "^0.24.0"
},

@@ -41,0 +46,0 @@ "scripts": {

@@ -6,17 +6,18 @@ # remark-message-control

[![Downloads][downloads-badge]][downloads]
[![Chat][chat-badge]][chat]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
Enable, disable, and ignore messages with [**remark**][remark].
[**remark**][remark] plugin to enable, disable, and ignore messages.
## Installation
## Install
[npm][]:
```bash
```sh
npm install remark-message-control
```
## Usage
## Use

@@ -33,3 +34,3 @@ Say we have the following file, `example.md`:

```javascript
```js
var vfile = require('to-vfile')

@@ -62,3 +63,3 @@ var report = require('vfile-reporter')

### `remark.use(control, options)`
### `remark().use(control, options)`

@@ -71,3 +72,3 @@ Let comment markers control messages from a certain sources.

`string` — Name of markers that can control the message sources.
Name of markers that can control the message sources (`string`).

@@ -82,4 +83,4 @@ For example, `{name: 'alpha'}` controls `alpha` markers:

`Array.<string>`, optional — List of allowed `ruleId`s. When given, a warning
is shown when someone tries to control an unknown rule.
List of allowed `ruleId`s (`Array.<string>`, optional).
When given, a warning is shown when someone tries to control an unknown rule.

@@ -95,19 +96,19 @@ For example, `{name: 'alpha', known: ['bravo']}` results in a warning if

`boolean`, default: `false` — Whether to treat all messages as turned off
initially.
Whether to treat all messages as turned off initially (`boolean`, default:
`false`).
###### `options.enable`
`Array.<string>`, optional — List of allowed `ruleId`s used when `reset: true`
to initially turn on. By default (`reset: false`), all rules are turned on.
List of `ruleId`s to initially turn on if `reset: true` (`Array.<string>`,
optional).
By default (`reset: false`), all rules are turned on.
###### `options.disable`
`Array.<string>`, optional — List of disallowed `ruleId`s used when
`reset: false` to initially turn off.
List of `ruleId`s to turn on if `reset: false` (`Array.<string>`, optional).
###### `options.sources`
`string` or `Array.<string>`, optional — One or more sources which markers by
the specified `name` can control. Defaults to `options.name`.
Sources that can be controlled with `name` markers (`string` or
`Array.<string>`, default: `options.name`).

@@ -118,5 +119,4 @@ ### Markers

The **disable** marker turns off all messages of the given rule
identifiers. When without identifiers, all messages are turned
off.
The **disable** keyword turns off all messages of the given rule identifiers.
When without identifiers, all messages are turned off.

@@ -137,5 +137,4 @@ For example, to turn off certain messages:

The **enable** marker turns on all messages of the given rule
identifiers. When without identifiers, all messages are turned
on.
The **enable** keyword turns on all messages of the given rule identifiers.
When without identifiers, all messages are turned on.

@@ -152,7 +151,7 @@ For example, to enable certain messages:

The **ignore** marker turns off all messages of the given rule
identifiers occurring in the following node. When without
identifiers, all messages are turned off.
The **ignore** keyword turns off all messages of the given `ruleId`s occurring
in the following node.
When without `ruleId`s, all messages are ignored.
After the end of the following node, messages are allowed again.
After the end of the following node, messages are turned on again.

@@ -170,7 +169,9 @@ For example, to turn off certain messages for the next node:

See [`contributing.md` in `remarkjs/remark`][contributing] for ways to get
started.
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This organisation has a [Code of Conduct][coc]. By interacting with this
repository, organisation, or community you agree to abide by its terms.
This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.

@@ -183,3 +184,3 @@ ## License

[build-badge]: https://img.shields.io/travis/remarkjs/remark-message-control.svg
[build-badge]: https://img.shields.io/travis/remarkjs/remark-message-control/master.svg

@@ -196,5 +197,5 @@ [build]: https://travis-ci.org/remarkjs/remark-message-control

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-message-control.svg
[chat]: https://spectrum.chat/unified/remark
[size]: https://bundlephobia.com/result?p=remark-message-control

@@ -207,12 +208,20 @@ [sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg

[license]: license
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[author]: https://wooorm.com
[chat]: https://spectrum.chat/unified/remark
[npm]: https://docs.npmjs.com/cli/install
[remark]: https://github.com/remarkjs/remark
[health]: https://github.com/remarkjs/.github
[contributing]: https://github.com/remarkjs/remark/blob/master/contributing.md
[contributing]: https://github.com/remarkjs/.github/blob/master/contributing.md
[coc]: https://github.com/remarkjs/remark/blob/master/code-of-conduct.md
[support]: https://github.com/remarkjs/.github/blob/master/support.md
[coc]: https://github.com/remarkjs/.github/blob/master/code-of-conduct.md
[license]: license
[author]: https://wooorm.com
[remark]: https://github.com/remarkjs/remark
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc