Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
remark-retext
Advanced tools
remark plugin to bridge or mutate to retext.
npm:
npm install remark-retext
Say we have the following file, example.md
:
## Hello guys!
And our script, example.js
, looks as follows:
var vfile = require('to-vfile')
var report = require('vfile-reporter')
var unified = require('unified')
var parse = require('remark-parse')
var stringify = require('remark-stringify')
var remark2retext = require('remark-retext')
var english = require('retext-english')
var equality = require('retext-equality')
unified()
.use(parse)
.use(
remark2retext,
unified()
.use(english)
.use(equality)
)
.use(stringify)
.process(vfile.readSync('example.md'), function(err, file) {
console.error(report(err || file))
})
Now, running node example
yields:
example.md
1:10-1:14 warning `guys` may be insensitive, use `people`, `persons`, `folks` instead gals-men retext-equality
⚠ 1 warning
origin.use(remark2retext, destination[, options])
remark (mdast) plugin to bridge or mutate to retext (nlcst).
destination
destination
is either a parser or a processor.
If a Unified
processor is given, runs the destination processor
with the new nlcst tree, then, after running discards that tree and continues on
running the origin processor with the original tree (bridge mode).
If a parser (such as parse-latin
, parse-english
, or
parse-dutch
) is given, passes the tree to further plugins
(mutate mode).
options
Passed to mdast-util-to-nlcst
.
rehype-retext
— Transform HTML (hast) to natural language nlcstremark-rehype
— Transform Markdown (mdast) to HTML (hast)rehype-remark
— Transform HTML (hast) to Markdown (mdast)mdast-util-to-nlcst
— Underlying algorithmSee contributing.md
in remarkjs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.
FAQs
remark plugin to support retext
The npm package remark-retext receives a total of 57,789 weekly downloads. As such, remark-retext popularity was classified as popular.
We found that remark-retext demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.