Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
markdown-it-auto-parnum
Advanced tools
This markdown-it plugin numbers paragraphs automatically.
yarn add markdown-it-auto-parnum
const md = require('markdown-it')()
.use(require('markdown-it-auto-parnum'))
md.render('This is a paragraph.')
This library has several options, most of which should not be needed under normal circumstances. These are (with their default values):
id="sec1"
.'paragraph,fence'
.{ numberedElements: 'paragraph,blockquote', skippedElements: 'blockquote' }
.If no numbering scheme is explicitly set within a document, this library will try to determine the best numbering scheme based on its headings. The algorithm for this is to number:
So, by default a document with a single h1
and multiple h2
and h3
elements will receive paragraph numbers like 1.1
, where the first number is incremented with each h2
element.
Within a markdown document, numbering for a given paragraph or heading may be explicitly specified by adding the html attribute "¶". Using the markdown-it-attrs plugin, this would look like {¶=123}
at the end of a block of text. For multi-level numbering, any non-numeric characters in a specified paragraph number will set the scheme for subsequent paragraph numbering; for example, if the first paragraph is numbered as {¶=1:1}
then the next paragraph will automatically be numbered 1:2
, and the next numbered heading will be 2
, and the following paragraph 2:1
, etc.
There are also a few control words for altering the automated paragraph numbering:
¶=manual
: For subsequent paragraphs, number only the ones that are explicitly specified in the Markdown.¶=auto
or ¶=start
or ¶=on
: Number subsequent paragraphs automatically.¶=stop
or ¶=off
: Do not number subsequent paragraphs until numbering is turned on with an explicit number or auto
, start
, or on
.¶=skip
or ¶=none
: Skip numbering for the specified paragraph only.FAQs
A markdown-it plugin for automatic paragraph numbering.
The npm package markdown-it-auto-parnum receives a total of 3 weekly downloads. As such, markdown-it-auto-parnum popularity was classified as not popular.
We found that markdown-it-auto-parnum demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.