Fix wrapping plain text
This commit is contained in:
parent
93d389ae39
commit
5bb8dca8b4
4
.env
4
.env
@ -1,5 +1,5 @@
|
|||||||
API_ID=1025907
|
API_ID=1025907
|
||||||
API_HASH=452b0359b988148995f22ff0f4229750
|
API_HASH=452b0359b988148995f22ff0f4229750
|
||||||
VERSION=1.0.3
|
VERSION=1.0.3
|
||||||
VERSION_FULL=1.0.3 (66)
|
VERSION_FULL=1.0.3 (68)
|
||||||
BUILD=66
|
BUILD=68
|
||||||
|
@ -901,7 +901,7 @@ namespace RichTextProcessor {
|
|||||||
/**
|
/**
|
||||||
* ! This function is still unsafe to use with .innerHTML
|
* ! This function is still unsafe to use with .innerHTML
|
||||||
*/
|
*/
|
||||||
export function wrapPlainText(text: string, entities?: MessageEntity[]) {
|
export function wrapPlainText(text: string, entities: MessageEntity[] = []) {
|
||||||
if(entities?.length) {
|
if(entities?.length) {
|
||||||
entities = entities.filter(entity => entity._ === 'messageEntitySpoiler');
|
entities = entities.filter(entity => entity._ === 'messageEntitySpoiler');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user