mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-03-19 04:29:45 +08:00
🐛 修复部分帖子渲染异常
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user