import { contentAsText } from '../helpers.js' export default async function (doc, rootNode) { const node = { type: rootNode.head, variant: rootNode.tail || 'neutral', class: '' } for await (const child of rootNode.children()) { if (child.is('class')) node.class = child.tail } return node }