
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@leafac/rehype-shiki
Advanced tools
$ npm install @leafac/rehype-shiki shiki
Code blocks must have the following format:
<pre>
<code class="language-javascript">
return unified();
</code>
</pre>
This is the format produced by remark-parse & remark-rehype from the following Markdown:
```javascript
return unified();
```
See source/index.test.ts
for examples.
highlighter
(required): An instance of the Shiki highlighter, or an object whose keys are identifiers and values are Shiki highlighters, in which case @leafac/rehype-shiki combines the outputs of all the highlighters.throwOnUnsupportedLanguage
(default: false
): A boolean indicating whether to throw an exception if a code block refers to an unsupported language.@leafac/rehype-shiki doesn’t open you up to cross-site scripting (XSS) attacks as long as Shiki doesn’t (which it doesn’t).
rehype-shiki is great! That’s how I learned about Shiki and I fell in love with it. The following are the ways in which @leafac/rehype-shiki is different:
peerDependency
, so @leafac/rehype-shiki doesn’t have to be updated when new versions of Shiki are released (as long as Shiki’s API remain compatible). See https://github.com/rsclarke/rehype-shiki/pull/48 https://github.com/rsclarke/rehype-shiki/pull/46 https://github.com/rsclarke/rehype-shiki/issues/47 https://github.com/rsclarke/rehype-shiki/issues/2..processSync()
.language-*
class will be removed from the produced HTML, so you may need to adapt your CSS.)That said, I contacted the maintainers of rehype-shiki and try to merge the code bases. We’ll see…
shiki@0.11.1
.position
of the top element
node. Useful for products that need to map the HTML back to the Markdown that generated it (see tests).FAQs
Rehype plugin to highlight code blocks with Shiki
The npm package @leafac/rehype-shiki receives a total of 1,059 weekly downloads. As such, @leafac/rehype-shiki popularity was classified as popular.
We found that @leafac/rehype-shiki 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.