"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.YfmConfigsSpecs = void 0;
const tslib_1 = require("tslib");
const markdown_it_attrs_1 = tslib_1.__importDefault(require("markdown-it-attrs"));
const lodash_1 = require("../../../../lodash.js");
const defaultAttrsOpts = {
    allowedAttributes: ['id'],
};
const YfmConfigsSpecs = (builder, opts) => {
    const attrsOpts = { ...defaultAttrsOpts, ...opts.attrs };
    // MAJOR: remove markdown-it-attrs
    if (!opts.disableAttrs) {
        builder.configureMd((md) => md.use(markdown_it_attrs_1.default, attrsOpts), { text: false });
    }
    // ignore yfm lint token
    builder.addNode('__yfm_lint', () => ({
        spec: {},
        fromMd: { tokenSpec: { name: '__yfm_lint', type: 'node', ignore: true } },
        toMd: lodash_1.noop,
    }));
};
exports.YfmConfigsSpecs = YfmConfigsSpecs;
//# sourceMappingURL=index.js.map
