"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BoldSpecs = exports.boldType = exports.boldMarkName = void 0;
const schema_1 = require("../../../../utils/schema.js");
exports.boldMarkName = 'strong';
exports.boldType = (0, schema_1.markTypeFactory)(exports.boldMarkName);
const BoldSpecs = (builder) => {
    builder.addMark(exports.boldMarkName, () => ({
        spec: {
            parseDOM: [
                { tag: 'b' },
                { tag: 'strong' },
                {
                    style: 'font-weight',
                    getAttrs: (value) => /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null,
                },
            ],
            toDOM() {
                return ['strong'];
            },
        },
        fromMd: {
            tokenSpec: {
                name: exports.boldMarkName,
                type: 'mark',
            },
        },
        toMd: { open: '**', close: '**', mixable: true, expelEnclosingWhitespace: true },
    }));
};
exports.BoldSpecs = BoldSpecs;
//# sourceMappingURL=index.js.map
