@mirus/tiptap-editor 2.0.1 → 2.1.1

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.
@@ -21971,7 +21971,7 @@ function Cw(t, e, n, r, i) {
21971
21971
  let d;
21972
21972
  for (; d = a.exec(f.text); ) {
21973
21973
  const h = o.find((v) => v.value === d[0]), m = p + d.index;
21974
- h.offset && h.length ? m == h.offset && u(m, m + d[0].length, d[0]) : u(m, m + d[0].length, d[0]);
21974
+ h.offset && h.length ? m - 1 == h.offset && u(m, m + d[0].length, d[0]) : u(m, m + d[0].length, d[0]);
21975
21975
  }
21976
21976
  }
21977
21977
  }), { highlights: l, on: c };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirus/tiptap-editor",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "custom setup for the tiptap editor",
5
5
  "repository": "https://github.com/mirusresearch/tiptap-editor",
6
6
  "bugs": {
package/src/warnings.js CHANGED
@@ -69,7 +69,7 @@ function lint(doc, position, prev, getErrorWords, getInitialCharacterCount) {
69
69
  // highlight specific instance if the error has offset data
70
70
  const indexOfMatchedWord = pos + m.index;
71
71
  if (originalErrorWord.offset && originalErrorWord.length) {
72
- if (indexOfMatchedWord == originalErrorWord.offset) {
72
+ if (indexOfMatchedWord - 1 == originalErrorWord.offset) {
73
73
  record(indexOfMatchedWord, indexOfMatchedWord + m[0].length, m[0]);
74
74
  }
75
75
  } else {