fix: restore title when it is the same as its sitename

This commit is contained in:
Acid Chicken (硫酸鶏) 2024-06-04 23:05:38 +09:00
parent 55f39f6926
commit 4801fa8829
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99

View File

@ -28,6 +28,9 @@ function postProcess(summary: Summary | null) {
}
if (summary.sitename !== null) {
summary.title = cleanupTitle(summary.title, summary.sitename)
if (!summary.title) {
summary.title = summary.sitename
}
}
summary.title = clip(summary.title, 100)
summary.description = summary.description && clip(summary.description, 300)