Files
NapCatQQ/.pnpm-store/v3/files/e0/ea9d61a0bd1858e56b690a15d39326972134323f1a7a89fe704bee4149cdbff53e2adda9155780aea4af48314527e5af49d9b58568d98349d1ae88424c8fca
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

31 lines
638 B
Plaintext

/**
* @typedef {import('hast').Element} Element
* @typedef {import('mdast').Emphasis} Emphasis
* @typedef {import('../state.js').State} State
*/
// Make VS Code show references to the above types.
''
/**
* Turn an mdast `emphasis` node into hast.
*
* @param {State} state
* Info passed around.
* @param {Emphasis} node
* mdast node.
* @returns {Element}
* hast node.
*/
export function emphasis(state, node) {
/** @type {Element} */
const result = {
type: 'element',
tagName: 'em',
properties: {},
children: state.all(node)
}
state.patch(node, result)
return state.applyData(node, result)
}