@cntrl-site/sdk-nextjs 0.8.8 → 0.8.9

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.
@@ -238,7 +238,7 @@ function sliceSymbols(text, start, end = NaN) {
238
238
  }
239
239
  if (isNaN(startOffset))
240
240
  return '';
241
- return text.slice(startOffset, endOffset + 1);
241
+ return text.slice(startOffset, endOffset);
242
242
  }
243
243
  function getSymbolsCount(input) {
244
244
  let count = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk-nextjs",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "description": "SDK for Next.js",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.js",
@@ -108,7 +108,11 @@ export class RichTextConverter {
108
108
  if (offset < style.start) {
109
109
  entityKids.push(sliceSymbols(content, offset, style.start));
110
110
  }
111
- entityKids.push(<span key={style.start} className={`s-${style.start}-${style.end}`}>{sliceSymbols(content, style.start, style.end)}</span>);
111
+ entityKids.push(
112
+ <span key={style.start} className={`s-${style.start}-${style.end}`}>
113
+ {sliceSymbols(content, style.start, style.end)}
114
+ </span>
115
+ );
112
116
  offset = style.end;
113
117
  }
114
118
  if (offset < entity.end) {
@@ -271,7 +275,7 @@ function sliceSymbols(text: string, start: number, end: number = NaN): string {
271
275
  endOffset += ch.length;
272
276
  }
273
277
  if (isNaN(startOffset)) return '';
274
- return text.slice(startOffset, endOffset + 1);
278
+ return text.slice(startOffset, endOffset);
275
279
  }
276
280
 
277
281
  function getSymbolsCount(input: string): number {