Socket
Socket
Sign inDemoInstall

mdast-util-to-hast

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-to-hast - npm Package Compare versions

Comparing version 10.1.1 to 10.2.0

11

lib/handlers/code.js

@@ -9,4 +9,7 @@ 'use strict'

var value = node.value ? node.value + '\n' : ''
// To do: next major, use `node.lang` w/o regex, the splitting’s been going
// on for years in remark now.
var lang = node.lang && node.lang.match(/^[^ \t]+(?=[ \t]|$)/)
var props = {}
var code

@@ -17,3 +20,9 @@ if (lang) {

return h(node.position, 'pre', [h(node, 'code', props, [u('text', value)])])
code = h(node, 'code', props, [u('text', value)])
if (node.meta) {
code.data = {meta: node.meta}
}
return h(node.position, 'pre', [code])
}

5

package.json
{
"name": "mdast-util-to-hast",
"version": "10.1.1",
"version": "10.2.0",
"description": "mdast utility to transform to hast",

@@ -52,3 +52,3 @@ "license": "MIT",

"tinyify": "^3.0.0",
"xo": "^0.36.0"
"xo": "^0.37.0"
},

@@ -87,2 +87,3 @@ "scripts": {

"rules": {
"unicorn/explicit-length-check": "off",
"unicorn/prefer-includes": "off"

@@ -89,0 +90,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