PHP 8.2.30
Preview: index.cjs Size: 1.68 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@tiptap/extension-code/dist/index.cjs

'use strict';

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

var core = require('@tiptap/core');

const inputRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;
const pasteRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))/g;
const Code = core.Mark.create({
    name: 'code',
    addOptions() {
        return {
            HTMLAttributes: {},
        };
    },
    excludes: '_',
    code: true,
    exitable: true,
    parseHTML() {
        return [
            { tag: 'code' },
        ];
    },
    renderHTML({ HTMLAttributes }) {
        return ['code', core.mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
    },
    addCommands() {
        return {
            setCode: () => ({ commands }) => {
                return commands.setMark(this.name);
            },
            toggleCode: () => ({ commands }) => {
                return commands.toggleMark(this.name);
            },
            unsetCode: () => ({ commands }) => {
                return commands.unsetMark(this.name);
            },
        };
    },
    addKeyboardShortcuts() {
        return {
            'Mod-e': () => this.editor.commands.toggleCode(),
        };
    },
    addInputRules() {
        return [
            core.markInputRule({
                find: inputRegex,
                type: this.type,
            }),
        ];
    },
    addPasteRules() {
        return [
            core.markPasteRule({
                find: pasteRegex,
                type: this.type,
            }),
        ];
    },
});

exports.Code = Code;
exports["default"] = Code;
exports.inputRegex = inputRegex;
exports.pasteRegex = pasteRegex;
//# sourceMappingURL=index.cjs.map

Directory Contents

Dirs: 1 × Files: 6

Name Size Perms Modified Actions
packages DIR
- drwxr-xr-x 2026-02-28 00:27:44
Edit Download
1.68 KB lrw-r--r-- 2026-02-28 00:26:36
Edit Download
3.12 KB lrw-r--r-- 2026-02-28 00:27:14
Edit Download
1.58 KB lrw-r--r-- 2026-02-28 00:26:46
Edit Download
3.05 KB lrw-r--r-- 2026-02-28 00:27:26
Edit Download
2.17 KB lrw-r--r-- 2026-02-28 00:26:54
Edit Download
3.13 KB lrw-r--r-- 2026-02-28 00:27:34
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).