planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

33
node_modules/hast-util-to-mdast/lib/one.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
'use strict'
module.exports = one
var all = require('./all')
var own = require('./util/own')
var wrapText = require('./util/wrap-text')
function one(h, node, parent) {
var fn
if (node.type === 'element') {
if (node.properties && node.properties.dataMdast === 'ignore') {
return
}
if (own.call(h.handlers, node.tagName)) {
fn = h.handlers[node.tagName]
}
} else if (own.call(h.handlers, node.type)) {
fn = h.handlers[node.type]
}
return (typeof fn === 'function' ? fn : unknown)(h, node, parent)
}
function unknown(h, node) {
if (node.value) {
return h(node, 'text', wrapText(h, node.value))
}
return all(h, node)
}