Skip to content

Commit

Permalink
fix(route): add center tag to sis001 articles (#16644)
Browse files Browse the repository at this point in the history
  • Loading branch information
keocheung authored Sep 7, 2024
1 parent de87a4a commit 39cb8d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes/sis001/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function getThread(item) {
.html()
?.replaceAll('\n', '')
.replaceAll(/\u3000{2}.+?(((?:<br>){2})|(&nbsp;))/g, (str) => `<p>${str.replaceAll('<br>', '')}</p>`)
.replaceAll(/<p>\u3000{6,}(.+?)<\/p>/g, '<p style="text-align:center;">$1</p>')
.replaceAll(/<p>\u3000{6,}(.+?)<\/p>/g, '<center><p style="text-align:center;">$1</p></center>')
.replaceAll('&nbsp;', '')
.replace(/<br><br> +<br><br>/, '') + ($('.defaultpost .postattachlist').html() ?? '');
return item;
Expand Down

0 comments on commit 39cb8d7

Please sign in to comment.