🐛 修复部分帖子渲染异常

This commit is contained in:
BTMuli
2025-10-25 12:31:03 +08:00
parent 5d03a32362
commit 2a2a190f5f
2 changed files with 2 additions and 2 deletions

View File

@@ -74,8 +74,6 @@ function getParsedData(data: SctPostDataArr): SctPostDataArr {
if (check < parsedText.length && check !== 0) {
res.push(...child);
child = [];
} else if (check === 0 && child.length > 0) {
res.push(...child);
}
}
if (res.length === 0 && child.length > 0) res.push(...child);

View File

@@ -349,6 +349,8 @@ function parsePostUgc(post: TGApp.BBS.Post.Post): Array<TGApp.BBS.SctPost.Base>
for (const text of data.text) {
result.push(text);
}
// 手动添加换行以对齐解析逻辑
if (data.text.length > 0) result.push({ insert: "\n" });
for (const image of data.images) {
result.push({ insert: { image: image.image } });
}