import { Mark as t, markPasteRule as r, markInputRule as s, mergeAttributes as d } from "../../../../../@tiptap_core@2.14.0_@tiptap_pm@2.14.0/node_modules/@tiptap/core/dist/index.js";
const n = /(^|[^`])`([^`]+)`(?!`)/, a = /(^|[^`])`([^`]+)`(?!`)/g, u = t.create({
  name: "code",
  addOptions() {
    return {
      HTMLAttributes: {}
    };
  },
  excludes: "_",
  code: !0,
  exitable: !0,
  parseHTML() {
    return [
      { tag: "code" }
    ];
  },
  renderHTML({ HTMLAttributes: e }) {
    return ["code", d(this.options.HTMLAttributes, e), 0];
  },
  addCommands() {
    return {
      setCode: () => ({ commands: e }) => e.setMark(this.name),
      toggleCode: () => ({ commands: e }) => e.toggleMark(this.name),
      unsetCode: () => ({ commands: e }) => e.unsetMark(this.name)
    };
  },
  addKeyboardShortcuts() {
    return {
      "Mod-e": () => this.editor.commands.toggleCode()
    };
  },
  addInputRules() {
    return [
      s({
        find: n,
        type: this.type
      })
    ];
  },
  addPasteRules() {
    return [
      r({
        find: a,
        type: this.type
      })
    ];
  }
});
export {
  u as Code,
  u as default,
  n as inputRegex,
  a as pasteRegex
};
//# sourceMappingURL=index.js.map
