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.
mdast-util-heading-style
Advanced tools
Get the style of an MDAST heading.
npm:
npm install mdast-util-heading-style
mdast-util-heading-style is also available as an AMD, CommonJS, and globals module, uncompressed and compressed.
var style = require('mdast-util-heading-style');
var remark = require('remark')();
style(remark.parse('# ATX').children[0]); // 'atx'
style(remark.parse('# ATX #\n').children[0]); // 'atx-closed'
style(remark.parse('ATX\n===').children[0]); // 'setext'
style(remark.parse('### ATX').children[0]); // null
style(remark.parse('### ATX').children[0], 'setext'); // 'setext'
style(node[, relative])
Get the heading style of a node.
node
(Node
) — Node to parse;relative
(string
, optional) — Style to use for ambiguous headings
(atx-headings with a level of three or more could also be setext).string
('atx'
, 'atx-closed'
, or 'setext'
) — When an ambiguous
heading is found, either relative
or null
is returned.
Marker
A comment marker.
name
(string
) — Name of marker;attributes
(string
) — Value after name;parameters
(Object
) — Parsed attributes, tries to convert
values to numbers and booleans when possible;node
(Node
) — Reference to given node.FAQs
mdast utility to get the style of a heading
The npm package mdast-util-heading-style receives a total of 61,555 weekly downloads. As such, mdast-util-heading-style popularity was classified as popular.
We found that mdast-util-heading-style 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.