Socket
Socket
Sign inDemoInstall

@hashicorp/remark-plugins

Package Overview
Dependencies
122
Maintainers
30
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.0-canary.0 to 4.1.0-canary.1

2

package.json
{
"name": "@hashicorp/remark-plugins",
"description": "A potpourri of remark plugins used to process .mdx files",
"version": "4.1.0-canary.0",
"version": "4.1.0-canary.1",
"author": "Jeff Escalante",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/hashicorp/remark-plugins/issues",

@@ -50,10 +50,9 @@ const generateSlug = require('../../generate_slug')

if (isHtmlOrJsxNode) {
node.value.split('\n').forEach((nodeLine) => {
// Using `startsWith` enables seamlessly supporting future props
if (nodeLine.startsWith('<Tabs')) {
tabbedSectionDepth += 1
} else if (nodeLine === '</Tabs>') {
tabbedSectionDepth -= 1
}
})
// Note that a single HTML node could potentially contain multiple tags
const openTagMatches = node.value.match(/\<Tabs/g)
const openTagCount = openTagMatches ? openTagMatches.length : 0
tabbedSectionDepth += openTagCount
const closeTagMatches = node.value.match(/\<\/Tabs/g)
const closeTagCount = closeTagMatches ? closeTagMatches.length : 0
tabbedSectionDepth -= closeTagCount
}

@@ -60,0 +59,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc