'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('../../../../hast-util-to-html@8.0.4/node_modules/hast-util-to-html/index.js');
var index = require('../../../../hast-util-to-html@8.0.4/node_modules/hast-util-to-html/lib/index.js');

/**
 * @typedef {import('hast').Root} Root
 * @typedef {Root|Root['children'][number]} Node
 * @typedef {import('hast-util-to-html').Options} Options
 */


/**
 * @this {import('unified').Processor}
 * @type {import('unified').Plugin<[Options?]|Array<void>, Node, string>}
 */
function rehypeStringify(config) {
  const processorSettings = /** @type {Options} */ (this.data('settings'));
  const settings = Object.assign({}, processorSettings, config);

  Object.assign(this, {Compiler: compiler});

  /**
   * @type {import('unified').CompilerFunction<Node, string>}
   */
  function compiler(tree) {
    return index.toHtml(tree, settings)
  }
}

exports.default = rehypeStringify;
//# sourceMappingURL=index.js.map
