cherry-studio/.yarn/patches/@tiptap-extension-code-patch-5e999c6f1b.patch

30 lines
1.2 KiB
Diff
Vendored

diff --git a/dist/index.cjs b/dist/index.cjs
index e4106894f67ff68b78e4e7485b7beb24570f91c0..5f610691f63882c51a2583462da04d1a7532a235 100644
--- a/dist/index.cjs
+++ b/dist/index.cjs
@@ -29,8 +29,8 @@ module.exports = __toCommonJS(index_exports);
// src/code.ts
var import_core = require("@tiptap/core");
-var inputRegex = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/;
-var pasteRegex = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g;
+var inputRegex = /(?:^|[^`])(`([^`]+)`)(?!`)$/;
+var pasteRegex = /(?:^|[^`])(`([^`]+)`)(?!`)/g;
var Code = import_core.Mark.create({
name: "code",
addOptions() {
diff --git a/dist/index.js b/dist/index.js
index 3736cac514b979438a808705931636ae04b06d16..4b3e72200bd38d3d5f06464d9fafe1c068b22992 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -1,7 +1,7 @@
// src/code.ts
import { Mark, markInputRule, markPasteRule, mergeAttributes } from "@tiptap/core";
-var inputRegex = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/;
-var pasteRegex = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g;
+var inputRegex = /(?:^|[^`])(`([^`]+)`)(?!`)$/;
+var pasteRegex = /(?:^|[^`])(`([^`]+)`)(?!`)/g;
var Code = Mark.create({
name: "code",
addOptions() {