@prosekit/extensions 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,7 @@ function getCheckRanges(transactions, oldState, newState) {
|
|
81
81
|
|
82
82
|
// src/mark-rule/apply.ts
|
83
83
|
function getExpectedMarkings(rules, doc, from, to) {
|
84
|
-
const text = doc.textBetween(from, to, OBJECT_REPLACEMENT_CHARACTER);
|
84
|
+
const text = doc.textBetween(from, to, null, OBJECT_REPLACEMENT_CHARACTER);
|
85
85
|
const ranges = [];
|
86
86
|
for (const rule of rules) {
|
87
87
|
rule.regex.lastIndex = 0;
|
@@ -75,12 +75,14 @@ function createAutocompletePlugin({
|
|
75
75
|
const textContent = view.state.doc.textBetween(
|
76
76
|
from,
|
77
77
|
to,
|
78
|
+
null,
|
78
79
|
OBJECT_REPLACEMENT_CHARACTER
|
79
80
|
);
|
80
81
|
const deleteMatch = () => {
|
81
82
|
if (view.state.doc.textBetween(
|
82
83
|
from,
|
83
84
|
to,
|
85
|
+
null,
|
84
86
|
OBJECT_REPLACEMENT_CHARACTER
|
85
87
|
) === textContent) {
|
86
88
|
view.dispatch(view.state.tr.delete(from, to));
|