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
mdast utility to get the style of a heading.
npm:
npm install mdast-util-heading-style
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 parserelative
(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.
See contributing.md
in syntax-tree/.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
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.