Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rehype-prism

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-prism - npm Package Compare versions

Comparing version 1.0.2 to 2.0.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="0.1.1"></a>
## [2.0.0](https://www.github.com/Val-istar-Guo/rehype-prism/compare/v1.0.2...v2.0.0) (2022-03-20)
### ⚠ BREAKING CHANGES
* rehype-prism@2 need unified@10. if you want to use unified@9, please install rehype-prism@1
### Features
* optimize for unified v10 ([#10](https://www.github.com/Val-istar-Guo/rehype-prism/issues/10)) ([0b940ad](https://www.github.com/Val-istar-Guo/rehype-prism/commit/0b940add9985e824764691490e092e85d9a2da33))
### [1.0.2](https://www.github.com/Val-istar-Guo/rehype-prism/compare/v1.0.1...v1.0.2) (2022-03-11)

@@ -8,0 +19,0 @@

6

lib/package.json

@@ -30,3 +30,3 @@ {

"description": "The unified plugin used to highlight code block in html with Prism",
"version": "1.0.2",
"version": "2.0.0",
"directories": {

@@ -85,3 +85,3 @@ "test": "tests"

"typescript-transform-paths": "^2.2.3",
"unified": "9.2.1"
"unified": "^10.1.2"
},

@@ -98,5 +98,5 @@ "dependencies": {

"peerDependencies": {
"unified": "^9 || ^10"
"unified": "^10"
},
"types": "lib/index.d.ts"
}

@@ -1,6 +0,6 @@

import unified from 'unified';
import unifiedTypes from 'unified';
interface Options {
plugins: ('autolinker' | 'autoloader' | 'command-line' | 'copy-to-clipboard' | 'custom-class' | 'data-uri-highlight' | 'diff-highlight' | 'download-button' | 'file-highlight' | 'filter-highlight-all' | 'highlight-keywords' | 'inline-color' | 'jsonp-highlight' | 'keep-markup' | 'line-highlight' | 'line-numbers' | 'match-braces' | 'normalize-whitespace' | 'previewers' | 'remove-initial-line-feed' | 'show-invisibles' | 'show-language' | 'toolbar' | 'treeview' | 'unescaped-markup' | 'wpd')[];
}
declare const rehypePrism: unified.Plugin<[Options?]>;
declare const rehypePrism: unifiedTypes.Plugin<[Options?]>;
export default rehypePrism;
import Prism from 'prismjs';
import parse from 'rehype-parse';
import unified from 'unified';
import { unified } from 'unified';
import { visit } from 'unist-util-visit';

@@ -5,0 +5,0 @@ import { select } from 'unist-util-select';

@@ -30,3 +30,3 @@ {

"description": "The unified plugin used to highlight code block in html with Prism",
"version": "1.0.2",
"version": "2.0.0",
"directories": {

@@ -85,3 +85,3 @@ "test": "tests"

"typescript-transform-paths": "^2.2.3",
"unified": "9.2.1"
"unified": "^10.1.2"
},

@@ -98,5 +98,5 @@ "dependencies": {

"peerDependencies": {
"unified": "^9 || ^10"
"unified": "^10"
},
"types": "lib/index.d.ts"
}

@@ -22,3 +22,3 @@ # rehype-prism

```typescript
import unified from 'unified'
import { unified } from 'unified'
import rehyper from 'rehyper'

@@ -80,3 +80,5 @@ import remarkParse from 'remark-parse'

<!-- addition --><!-- addition -->
<!-- addition -->
If in doubt, please submit an issue.
<!-- addition -->

@@ -83,0 +85,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc