Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
container.unshift(
h(null, 'input', {
type: 'checkbox',
checked: node.checked,
disabled: true
})
)
// According to github-markdown-css, this class hides bullet.
// See: .
props.className = ['task-list-item']
}
if (loose && result.length !== 0) {
result = wrap(result, true)
}
return h(node, 'li', props, result)
}
const items = all(h, node)
const length = items.length
// Like GitHub, add a class for custom styling.
while (++index < length) {
if (
items[index].properties.className &&
items[index].properties.className.includes('task-list-item')
) {
props.className = ['contains-task-list']
break
}
}
return h(node, name, props, wrap(items, true))
}
export default function root (h, node) {
return h.augment(node, u('root', wrap(all(h, node))))
}
let out
let name
let cell
while (index--) {
row = rows[index].children
name = index === 0 ? 'th' : 'td'
pos = alignLength
out = []
while (pos--) {
cell = row[pos]
out[pos] = h(cell, name, { align: align[pos] }, cell ? all(h, cell) : [])
}
result[index] = h(rows[index], 'tr', wrap(out, true))
}
return h(
node,
'table',
wrap(
[
h(result[0].position, 'thead', wrap([result[0]], true)),
h(
{
start: position.start(result[1]),
end: position.end(result[result.length - 1])
},
'tbody',
wrap(result.slice(1), true)
)
name = index === 0 ? 'th' : 'td'
pos = alignLength
out = []
while (pos--) {
cell = row[pos]
out[pos] = h(cell, name, { align: align[pos] }, cell ? all(h, cell) : [])
}
result[index] = h(rows[index], 'tr', wrap(out, true))
}
return h(
node,
'table',
wrap(
[
h(result[0].position, 'thead', wrap([result[0]], true)),
h(
{
start: position.start(result[1]),
end: position.end(result[result.length - 1])
},
'tbody',
wrap(result.slice(1), true)
)
],
true
)
)
}
export default function blockquote (h, node) {
return h(node, 'blockquote', wrap(all(h, node), true))
}
result[index] = h(rows[index], 'tr', wrap(out, true))
}
return h(
node,
'table',
wrap(
[
h(result[0].position, 'thead', wrap([result[0]], true)),
h(
{
start: position.start(result[1]),
end: position.end(result[result.length - 1])
},
'tbody',
wrap(result.slice(1), true)
)
],
true
)
)
}