diff --git a/src/lib/richTextProcessor/wrapRichText.ts b/src/lib/richTextProcessor/wrapRichText.ts index 7edc9b83..5ca73111 100644 --- a/src/lib/richTextProcessor/wrapRichText.ts +++ b/src/lib/richTextProcessor/wrapRichText.ts @@ -419,7 +419,7 @@ export default function wrapRichText(text: string, options: Partial<{ (lastElement || fragment).append(element); } - while(nextEntity && nextEntity.offset < (endOffset - 1)) { + while(nextEntity && nextEntity.offset < endOffset) { ++nasty.i; (element || fragment).append(wrapRichText(nasty.text, {