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

@gridsome/remark-prismjs

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gridsome/remark-prismjs - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

11

CHANGELOG.md

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

# [0.5.0](https://github.com/gridsome/gridsome/tree/master/packages/remark-prismjs/compare/@gridsome/remark-prismjs@0.4.0...@gridsome/remark-prismjs@0.5.0) (2020-11-04)
### Features
* **prismjs:** add custom class prefix ([#1348](https://github.com/gridsome/gridsome/tree/master/packages/remark-prismjs/issues/1348)) ([0415068](https://github.com/gridsome/gridsome/tree/master/packages/remark-prismjs/commit/0415068ab8e590a25c6306334782c199f388cdb4))
# [0.4.0](https://github.com/gridsome/gridsome/tree/master/packages/remark-prismjs/compare/@gridsome/remark-prismjs@0.3.0...@gridsome/remark-prismjs@0.4.0) (2020-08-20)

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

5

index.js

@@ -10,3 +10,3 @@ const h = require('hastscript')

// load all prismjs languages
require('prismjs/plugins/custom-class/prism-custom-class')
require('prismjs/components/index')()

@@ -16,2 +16,3 @@

{
customClassPrefix = '',
transformInlineCode = false,

@@ -21,2 +22,4 @@ showLineNumbers: showLineNumbersGlobal = false

) => tree => {
Prism.plugins.customClass.prefix(customClassPrefix)
visit(tree, 'code', (node, index, parent) => {

@@ -23,0 +26,0 @@ parent.children.splice(index, 1, createCode(node, showLineNumbersGlobal))

4

package.json
{
"version": "0.4.0",
"version": "0.5.0",
"name": "@gridsome/remark-prismjs",

@@ -28,3 +28,3 @@ "description": "Syntax highlighter for markdown code blocks",

},
"gitHead": "012c1989a1696015dc9e86ddd5964f6cfd0744c8"
"gitHead": "bb70dcd9662383804515a1fc65309f2ad9e71b2e"
}

@@ -65,2 +65,10 @@ # @gridsome/remark-prismjs

#### customClassPrefix
- Type: `String`
- Default: `''`
If Prism's default classes are too generic and cause conflicts, you can add a prefix like `"prism--"` to all Prism
classes by passing it in as the `customClassPrefix`.
#### transformInlineCode

@@ -67,0 +75,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