fix(routes/nhk/news): fix `\n` not totally replaced to `<br>` (#18215)

This commit is contained in:
cnk 2025-01-25 23:00:44 +08:00 committed by GitHub
parent 4d3b58072c
commit bffd40cb93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ export const route: Route = {
},
],
name: 'WORLD-JAPAN - Top Stories',
maintainers: ['TonyRL', 'pseudoyu'],
maintainers: ['TonyRL', 'pseudoyu', 'cscnk52'],
handler,
};
@ -82,7 +82,7 @@ async function handler(ctx) {
item.category = Object.values(data.data.categories);
item.description = art(path.join(__dirname, 'templates/news.art'), {
img: data.data.thumbnails,
description: data.data.detail.replace('\n\n', '<br><br>'),
description: data.data.detail.replaceAll('\n\n', '<br><br>'),
});
delete item.id;
return item;