chore(ckeditor): edit patches & add one for code blocks

This commit is contained in:
Elian Doran
2025-05-08 20:12:40 +03:00
parent 73f69f91f2
commit 5db6043017
3 changed files with 47 additions and 11 deletions

View File

@@ -1,11 +1,11 @@
diff --git a/build/mention.js b/build/mention.js
deleted file mode 100644
index 6d433b2062ba52bcc6d70c911d38575e91b89d2c..0000000000000000000000000000000000000000
index 3ef262a2fb7cbb953b35cb7e07a999edce6dc72a..0000000000000000000000000000000000000000
diff --git a/dist/index.js b/dist/index.js
index 9ba3f42b4093dce3174866f3321e03334d70e92e..62b0015a4bd255148496190c23ee48d6e9b1b5c2 100644
index bbe511c5550e1cac8612e998034382b4eea1f1b8..8394fd8bba89f8a7b82d62fe613be6f12703ff53 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -606,6 +606,16 @@ const defaultCommitKeyCodes = [
@@ -603,6 +603,16 @@ const defaultCommitKeyCodes = [
}
if (data.keyCode == keyCodes.esc) {
this._hideUIAndRemoveMarker();
@@ -22,7 +22,7 @@ index 9ba3f42b4093dce3174866f3321e03334d70e92e..62b0015a4bd255148496190c23ee48d6
}
}
}, {
@@ -1069,12 +1079,11 @@ const defaultCommitKeyCodes = [
@@ -1067,12 +1077,11 @@ const defaultCommitKeyCodes = [
*/ function createRegExp(marker, minimumCharacters) {
const numberOfCharacters = minimumCharacters == 0 ? '*' : `{${minimumCharacters},}`;
const openAfterCharacters = env.features.isRegExpUnicodePropertySupported ? '\\p{Ps}\\p{Pi}"\'' : '\\(\\[{"\'';
@@ -36,13 +36,11 @@ index 9ba3f42b4093dce3174866f3321e03334d70e92e..62b0015a4bd255148496190c23ee48d6
// The pattern consists of 3 groups:
//
// - 0 (non-capturing): Opening sequence - start of the line, space or an opening punctuation character like "(" or "\"",
@@ -1082,8 +1091,8 @@ const defaultCommitKeyCodes = [
// - 2: Mention input (taking the minimal length into consideration to trigger the UI),
@@ -1081,7 +1090,7 @@ const defaultCommitKeyCodes = [
//
// The pattern matches up to the caret (end of string switch - $).
- // (0: opening sequence )(1: marker )(2: typed mention )$
- const pattern = `(?:^|[ ${openAfterCharacters}])([${marker}])(${mentionCharacters}${numberOfCharacters})$`;
+ // (0: opening sequence )(1: marker )(2: typed mention )$
// (0: opening sequence )(1: marker )(2: typed mention )$
- const pattern = `(?:^|[ ${openAfterCharacters}])(${marker})(${mentionCharacters}${numberOfCharacters})$`;
+ const pattern = `(?:^|[= ${ openAfterCharacters }])([${ marker }])([${ mentionCharacters }]${ numberOfCharacters })$`;
return new RegExp(pattern, 'u');
}