diff --git a/package.json b/package.json index b9a364044c..6f1ca83860 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "focus-visible": "^5.2.0", "gfm.css": "^1.1.2", "glob-to-regexp": "^0.4.1", - "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", "highlight.js": "^11.3.1", "html-entities": "^2.0.0", "is-ip": "^3.1.0", diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx index 866c1d0a0c..89e9d76629 100644 --- a/src/HtmlUtils.tsx +++ b/src/HtmlUtils.tsx @@ -28,7 +28,7 @@ import { IContent } from "matrix-js-sdk/src/models/event"; import { Optional } from "matrix-events-sdk"; import _Linkify from "linkify-react"; import escapeHtml from "escape-html"; -import GraphemeSplitter from "grapheme-splitter"; +import GraphemeSplitter from "graphemer"; import { _linkifyElement, diff --git a/src/editor/parts.ts b/src/editor/parts.ts index 93d79fdf05..4483d04a62 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -19,7 +19,7 @@ import EMOJIBASE_REGEX from "emojibase-regex"; import { MatrixClient } from "matrix-js-sdk/src/client"; import { RoomMember } from "matrix-js-sdk/src/models/room-member"; import { Room } from "matrix-js-sdk/src/models/room"; -import GraphemeSplitter from "grapheme-splitter"; +import GraphemeSplitter from "graphemer"; import AutocompleteWrapperModel, { GetAutocompleterComponent, UpdateCallback, UpdateQuery } from "./autocomplete"; import { unicodeToShortcode } from "../HtmlUtils"; diff --git a/src/utils/strings.ts b/src/utils/strings.ts index 584b4204c9..53039cdc8f 100644 --- a/src/utils/strings.ts +++ b/src/utils/strings.ts @@ -21,7 +21,7 @@ limitations under the License. * @param text the plaintext to put in the user's clipboard */ import { logger } from "matrix-js-sdk/src/logger"; -import GraphemeSplitter from "grapheme-splitter"; +import GraphemeSplitter from "graphemer"; export async function copyPlaintext(text: string): Promise { try { diff --git a/yarn.lock b/yarn.lock index 83ddd17778..5037e0bb6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4937,6 +4937,11 @@ grapheme-splitter@^1.0.4: resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883"