mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-28 12:23:31 +01:00
do not spit url between Read More chunks by expanding chunk to end of url
This commit is contained in:
committed by
Josh Perez
parent
6ca3452488
commit
5df5cde48c
@@ -5,7 +5,7 @@ import React from 'react';
|
||||
|
||||
import type { Props as MessageBodyPropsType } from './MessageBody';
|
||||
import { MessageBody } from './MessageBody';
|
||||
import { graphemeAwareSlice } from '../../util/graphemeAwareSlice';
|
||||
import { graphemeAndLinkAwareSlice } from '../../util/graphemeAndLinkAwareSlice';
|
||||
|
||||
export type Props = Pick<
|
||||
MessageBodyPropsType,
|
||||
@@ -46,7 +46,7 @@ export function MessageBodyReadMore({
|
||||
}: Props): JSX.Element {
|
||||
const maxLength = displayLimit || INITIAL_LENGTH;
|
||||
|
||||
const { hasReadMore, text: slicedText } = graphemeAwareSlice(
|
||||
const { hasReadMore, text: slicedText } = graphemeAndLinkAwareSlice(
|
||||
text,
|
||||
maxLength,
|
||||
BUFFER
|
||||
|
||||
Reference in New Issue
Block a user