"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MonospaceSpecs = exports.monospaceType = exports.monospaceMarkName = void 0;
const tslib_1 = require("tslib");
const log_1 = tslib_1.__importDefault(require("@diplodoc/transform/lib/log"));
const monospace_1 = tslib_1.__importDefault(require("@diplodoc/transform/lib/plugins/monospace"));
const schema_1 = require("../../../../utils/schema.js");
exports.monospaceMarkName = 'monospace';
exports.monospaceType = (0, schema_1.markTypeFactory)(exports.monospaceMarkName);
const MonospaceSpecs = (builder) => {
    builder
        .configureMd((md) => md.use(monospace_1.default, { log: log_1.default }))
        .addMark(exports.monospaceMarkName, () => ({
        spec: {
            parseDOM: [{ tag: 'samp' }],
            toDOM() {
                return ['samp'];
            },
        },
        fromMd: {
            tokenSpec: {
                name: exports.monospaceMarkName,
                type: 'mark',
            },
        },
        toMd: {
            open: '##',
            close: '##',
            mixable: true,
            expelEnclosingWhitespace: true,
        },
    }));
};
exports.MonospaceSpecs = MonospaceSpecs;
//# sourceMappingURL=index.js.map
