Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@so1ve/rehype-shiki
Advanced tools
Readme
$ npm install @so1ve/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 @so1ve/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.@so1ve/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 @so1ve/rehype-shiki is different:
peerDependency
, so @so1ve/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 @so1ve/rehype-shiki receives a total of 38 weekly downloads. As such, @so1ve/rehype-shiki popularity was classified as not popular.
We found that @so1ve/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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.