"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MonospaceSpecs = exports.monospaceType = exports.monospaceMarkName = void 0;
const tslib_1 = require("tslib");
const log_js_1 = require("@diplodoc/transform/lib/log.js");
const monospace_js_1 = tslib_1.__importDefault(require("@diplodoc/transform/lib/plugins/monospace.js"));
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_js_1.default, { log: log_js_1.log }))
        .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
