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.
markdownlint-rule-extended-ascii
Advanced tools
A markdownlint rule that allows only extended ASCII characters
A markdownlint rule that allows only extended ASCII characters
This rule for the Node.js markdownlint library (and its associated tools) allows only extended ASCII characters in Markdown content. Specifically, it reports violations for characters that are not part of the ISO/IEC 8859-1 character set (a.k.a. "ISO Latin 1", a.k.a. Unicode Basic Latin plus Latin-1 Supplement).
Informally, this extension limits Markdown content to just the printable character codes less than 256. In other words, the standard 8-bit "western" character set from the early days of computing. While this is too restrictive to be practical for many purposes, it is all that's needed for basic English text as found in most README files, documentation, source code, and so on.
This rule will not be interesting to some people because it blocks the use of emoji as well as characters commonly used across Asia. However, it meaningfully prevents the accidental use of so-called smart-quotes, inconsistent em-dashes, ambiguous full-width characters, and the like.
To restrict things further and limit Markdown content to just the printable
character codes less than 128 (i.e., plain ASCII), set the rule's
ascii-only
parameter to true
.
npm install markdownlint-rule-extended-ascii --save-dev
If using markdownlint-cli
:
markdownlint --rules markdownlint-rule-extended-ascii *.md
If using markdownlint-cli2
and a
.markdownlint-cli2.jsonc
configuration file:
{
"customRules": [
"markdownlint-rule-extended-ascii"
]
}
If using markdownlint-cli2
and a
.markdownlint-cli2.yaml
configuration file:
customRules:
- markdownlint-rule-extended-ascii
If using the markdownlint
extension for VS Code:
See the markdownlint-cli2
examples above or refer to the extension
documentation
If using a JSON markdownlint
configuration object
to set the ascii-only
parameter:
{
"extended-ascii": {
"ascii-only": true
},
"some-other-rule": false
}
If using YAML:
extended-ascii:
ascii-only: true
some-other-rule: false
FAQs
A markdownlint rule that allows only extended ASCII characters
The npm package markdownlint-rule-extended-ascii receives a total of 3,868 weekly downloads. As such, markdownlint-rule-extended-ascii popularity was classified as popular.
We found that markdownlint-rule-extended-ascii demonstrated a healthy version release cadence and project activity because the last version was released less than 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.