import { headingLevelAttr } from "./const.js";
const defaultMarkupRender = (state, node) => state.write(state.repeat('#', node.attrs[headingLevelAttr]) + ' ');
export function headingToMarkdown({ renderMarkup = defaultMarkupRender, renderAttributes, } = {}) {
    return (...args) => {
        const [state, node] = args;
        renderMarkup(...args);
        state.renderInline(node);
        renderAttributes?.(...args);
        state.closeBlock(node);
    };
}
//# sourceMappingURL=utils.js.map
