Skip to content

Commit 82af247

Browse files
committed
feat: Enable markdown code block and inline code sanitization and downgrade actions/checkout to v4.
1 parent a8ce930 commit 82af247

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/scripts/transform-message-for-card.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ const createUserLink = (user: GitHubUser) =>
6161
const sanitizeMarkdown = (text: string): string => {
6262
return text
6363
// 移除代码块
64-
// .replace(/```[\s\S]*?```/g, '[代码块]')
64+
.replace(/```[\s\S]*?```/g, '[代码块]')
6565
// 移除行内代码
66-
// .replace(/`[^`]+`/g, (match) => match.slice(1, -1))
66+
.replace(/`[^`]+`/g, (match) => match.slice(1, -1))
6767
// 将图片转换为链接文本
6868
.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, '🖼️ [$1]($2)')
6969
// 将 ### 标题转换为加粗

.github/workflows/Lark-notification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
send-Lark-message:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v5
20+
- uses: actions/checkout@v4
2121

2222
- uses: denoland/setup-deno@v2
2323
with:

0 commit comments

Comments
 (0)