Skip to content

Commit 6f41c14

Browse files
committed
Update upload.yml
1 parent 8a994b6 commit 6f41c14

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/upload.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ jobs:
2424
.replace(/<p>/g, '')
2525
.replace(/<\/p>/g, '\n')
2626
.replace(/<br>/g, '\n')
27-
.replace(/<a class="[^"]*" href="([^"]*)">([^<]*)<\/a>/g, '<a href="$1">$2</a>')
27+
// 简化所有链接,只保留 href 和文本内容
28+
.replace(/<a[^>]*href="([^"]*)"[^>]*>([^<]*)<\/a>/g, '<a href="$1">$2</a>')
2829
.replace(/<tt>([^<]*)<\/tt>/g, '$1')
2930
.replace(/<strong>([^<]*)<\/strong>/g, '<b>$1</b>')
30-
.replace(/"/g, '') // 移除所有引号
31-
.replace(/\n{3,}/g, '\n\n') // 将多个换行符替换为两个
32-
.trim() // 移除首尾空白
31+
// 移除所有引号和多余的空格
32+
.replace(/"/g, '')
33+
.replace(/\s+/g, ' ')
34+
// 规范化换行符
35+
.replace(/\n{3,}/g, '\n\n')
36+
.trim()
3337
return processedHtml
3438
3539
- name: 发送Telegram通知

0 commit comments

Comments
 (0)