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

mdast-util-gfm-task-list-item

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-gfm-task-list-item - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

32

from-markdown.js

@@ -14,7 +14,11 @@ exports.exit = {

function exitParagraphWithTaskListItem(token) {
var parent = this.stack[this.stack.length - 2]
var node = this.stack[this.stack.length - 1]
var parent = this.stack[this.stack.length - 2]
var siblings = parent.children
var head = node.children[0]
var index = -1
var firstParaghraph
if (
parent &&
parent.type === 'listItem' &&

@@ -25,11 +29,21 @@ typeof parent.checked === 'boolean' &&

) {
// Must start with a space or a tab.
head.value = head.value.slice(1)
if (head.value.length === 0) {
node.children.shift()
} else {
head.position.start.column++
head.position.start.offset++
node.position.start = Object.assign({}, head.position.start)
while (++index < siblings.length) {
if (siblings[index].type === 'paragraph') {
firstParaghraph = siblings[index]
break
}
}
if (firstParaghraph === node) {
// Must start with a space or a tab.
head.value = head.value.slice(1)
if (head.value.length === 0) {
node.children.shift()
} else {
head.position.start.column++
head.position.start.offset++
node.position.start = Object.assign({}, head.position.start)
}
}
}

@@ -36,0 +50,0 @@

{
"name": "mdast-util-gfm-task-list-item",
"version": "0.1.4",
"version": "0.1.5",
"description": "mdast extension to parse and serialize GFM task list items",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -176,5 +176,5 @@ # mdast-util-gfm-task-list-item

[build-badge]: https://img.shields.io/travis/syntax-tree/mdast-util-gfm-task-list-item.svg
[build-badge]: https://github.com/syntax-tree/mdast-util-gfm-task-list-item/workflows/main/badge.svg
[build]: https://travis-ci.org/syntax-tree/mdast-util-gfm-task-list-item
[build]: https://github.com/syntax-tree/mdast-util-gfm-task-list-item/actions

@@ -181,0 +181,0 @@ [coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-gfm-task-list-item.svg

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