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

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 13.0.0 to 13.0.1

24

lib/state.js

@@ -294,3 +294,3 @@ /**

if (!Array.isArray(result) && result.type === 'text') {
result.value = result.value.replace(/^\s+/, '')
result.value = trimMarkdownSpaceStart(result.value)
}

@@ -302,3 +302,3 @@

if (head && head.type === 'text') {
head.value = head.value.replace(/^\s+/, '')
head.value = trimMarkdownSpaceStart(head.value)
}

@@ -452,1 +452,21 @@ }

}
/**
* Trim spaces and tabs at the start of `value`.
*
* @param {string} value
* Value to trim.
* @returns {string}
* Result.
*/
function trimMarkdownSpaceStart(value) {
let index = 0
let code = value.charCodeAt(index)
while (code === 9 || code === 32) {
index++
code = value.charCodeAt(index)
}
return value.slice(index)
}

7

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

@@ -49,4 +49,4 @@ "license": "MIT",

"c8": "^8.0.0",
"hast-util-to-html": "^8.0.4",
"hastscript": "^7.0.0",
"hast-util-to-html": "^9.0.0",
"hastscript": "^8.0.0",
"mdast-util-from-markdown": "^2.0.0",

@@ -113,2 +113,3 @@ "mdast-util-gfm": "^3.0.0",

"unicorn/prefer-at": "off",
"unicorn/prefer-code-point": "off",
"unicorn/prefer-string-replace-all": "off"

@@ -115,0 +116,0 @@ }

@@ -318,3 +318,3 @@ # mdast-util-to-hast

Handle a node (TypeScript).
Handle a node (TypeScript type).

@@ -336,3 +336,3 @@ ###### Parameters

Handle nodes (TypeScript).
Handle nodes (TypeScript type).

@@ -347,3 +347,3 @@ ###### Type

Configuration (TypeScript).
Configuration (TypeScript type).

@@ -386,3 +386,3 @@ ###### Fields

Raw string of HTML embedded into HTML AST (TypeScript).
Raw string of HTML embedded into HTML AST (TypeScript type).

@@ -389,0 +389,0 @@ ###### Type

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