Skip to content

Commit 9cb2951

Browse files
authored
fix(route/zhihu): enable processImage for people/answers to fix lazy-loaded images (#18671) (#21153)
1 parent 79c8adc commit 9cb2951

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/routes/zhihu/answers.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import type { Route } from '@/types';
22
import got from '@/utils/got';
33
import { parseDate } from '@/utils/parse-date';
4-
5-
import { getSignedHeader, header } from './utils';
4+
import { getSignedHeader, header, processImage } from './utils';
65

76
export const route: Route = {
87
path: '/people/answers/:id',
@@ -53,10 +52,9 @@ async function handler(ctx) {
5352
const data = response.data.data;
5453
const items = data.map((item) => {
5554
const title = item.question.title;
56-
// let description = processImage(detail.content);
5755
const url = `https://www.zhihu.com/question/${item.question.id}/answer/${item.id}`;
5856
const author = item.author.name;
59-
const description = item.content;
57+
const description = processImage(item.content);
6058

6159
return {
6260
title,

0 commit comments

Comments
 (0)