/** * @import {Info, State} from 'mdast-util-to-markdown' * @import {Paragraph, Parents} from 'mdast' */ /** * Serialize a paragraph node. * * @param {Paragraph} node * Node to serialize. * @param {Parents | undefined} _ * Parent node. * @param {State} state * Info passed around. * @param {Info} info * Info on surrounding context. * @returns {string} * Serialized markdown. */ export function paragraph(node, _, state, info) { const exit = state.enter('paragraph') const subexit = state.enter('phrasing') const value = state.containerPhrasing(node, info) subexit() exit() return value }