mdast-util-to-hast
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -12,5 +12,5 @@ 'use strict' | ||
h(node, 'a', {href: '#fn-' + identifier, className: ['footnote-ref']}, [ | ||
u('text', identifier) | ||
u('text', node.label || identifier) | ||
]) | ||
]) | ||
} |
@@ -11,2 +11,5 @@ 'use strict' | ||
var name = node.ordered ? 'ol' : 'ul' | ||
var items | ||
var index = -1 | ||
var length | ||
@@ -17,3 +20,17 @@ if (typeof node.start === 'number' && node.start !== 1) { | ||
return h(node, name, props, wrap(all(h, node), true)) | ||
items = all(h, node) | ||
length = items.length | ||
// Like GitHub, add a class for custom styling | ||
while (++index < length) { | ||
if ( | ||
items[index].properties.className && | ||
items[index].properties.className.indexOf('task-list-item') !== -1 | ||
) { | ||
props.className = ['contains-task-list'] | ||
break | ||
} | ||
} | ||
return h(node, name, props, wrap(items, true)) | ||
} |
{ | ||
"name": "mdast-util-to-hast", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Transform mdast to hast", | ||
@@ -36,3 +36,3 @@ "license": "MIT", | ||
"browserify": "^16.0.0", | ||
"nyc": "^13.0.0", | ||
"nyc": "^14.0.0", | ||
"prettier": "^1.13.3", | ||
@@ -43,3 +43,3 @@ "remark-cli": "^6.0.0", | ||
"tinyify": "^2.4.3", | ||
"xo": "^0.23.0" | ||
"xo": "^0.24.0" | ||
}, | ||
@@ -46,0 +46,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25603
612