"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.headingToMarkdown = headingToMarkdown;
const const_1 = require("./const.js");
const defaultMarkupRender = (state, node) => state.write(state.repeat('#', node.attrs[const_1.headingLevelAttr]) + ' ');
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
