Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
remark-align
Advanced tools
This plugin parses custom Markdown syntax to center- or right-align elements.
This plugin parses custom Markdown syntax to center- or right-align elements.
It adds three new node types, described below, to the mdast produced by remark:
LeftAligned
interface LeftAligned <: Parent {
type: "leftAligned";
data: {
hName: "div";
hProperties: {
class: string;
}
}
}
CenterAligned
interface CenterAligned <: Parent {
type: "centerAligned";
data: {
hName: "div";
hProperties: {
class: string;
}
}
}
RightAligned
interface RightAligned <: Parent {
type: "rightAligned";
data: {
hName: "div";
hProperties: {
class: string;
}
}
}
If you are using rehype, the stringified HTML result will be div
s with configurable CSS classes.
It is up to you to have CSS rules producing the desired result for these three classes.
Alignment is done by wrapping something in arrows indicating the alignment:
->paragraph<-
->paragraph->
produces:
<div class="some-class"><p>paragraph</p></div>
<div class="some-other-class"><p>paragraph</p></div>
npm:
npm install remark-align
Dependencies:
const unified = require('unified')
const remarkParse = require('remark-parse')
const stringify = require('rehype-stringify')
const remark2rehype = require('remark-rehype')
const remarkAlign = require('remark-align')
Usage:
unified()
.use(remarkParse)
.use(remarkAlign, {
left: 'align-left',
center: 'align-center',
right: 'align-right',
})
.use(remark2rehype)
.use(stringify)
FAQs
This plugin parses custom Markdown syntax to center- or right-align elements.
The npm package remark-align receives a total of 436 weekly downloads. As such, remark-align popularity was classified as not popular.
We found that remark-align demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.