diff --git a/src/components/viewPost/tp-parser.vue b/src/components/viewPost/tp-parser.vue index 590a84a9..d02fc97f 100644 --- a/src/components/viewPost/tp-parser.vue +++ b/src/components/viewPost/tp-parser.vue @@ -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); diff --git a/src/views/t-post.vue b/src/views/t-post.vue index 19bd9747..5059963e 100644 --- a/src/views/t-post.vue +++ b/src/views/t-post.vue @@ -349,6 +349,8 @@ function parsePostUgc(post: TGApp.BBS.Post.Post): Array 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 } }); }