in packages/docusaurus-mdx-loader/src/remark/utils/index.ts [17:36]
export function toValue(node: PhrasingContent | Heading): string {
switch (node?.type) {
case 'text':
return escapeHtml(node.value);
case 'heading':
return stringifyContent(node);
case 'inlineCode':
return `<code>${escapeHtml(node.value)}</code>`;
case 'emphasis':
return `<em>${stringifyContent(node)}</em>`;
case 'strong':
return `<strong>${stringifyContent(node)}</strong>`;
case 'delete':
return `<del>${stringifyContent(node)}</del>`;
case 'link':
return stringifyContent(node);
default:
return toString(node);
}
}