From eb416d174ca1967debccb40dfea466390b3593c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jim=20Liu=20=E5=AE=9D=E7=8E=89?= Date: Fri, 20 Mar 2026 18:45:05 -0500 Subject: [PATCH] fix(baoyu-post-to-wechat): prevent placeholder regex from matching longer numbered variants --- skills/baoyu-post-to-wechat/scripts/wechat-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/baoyu-post-to-wechat/scripts/wechat-api.ts b/skills/baoyu-post-to-wechat/scripts/wechat-api.ts index 20ac443..bab7431 100644 --- a/skills/baoyu-post-to-wechat/scripts/wechat-api.ts +++ b/skills/baoyu-post-to-wechat/scripts/wechat-api.ts @@ -450,7 +450,7 @@ function renderMarkdownWithPlaceholders( function replaceAllPlaceholders(html: string, placeholder: string, replacement: string): string { const escapedPlaceholder = placeholder.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); - return html.replace(new RegExp(escapedPlaceholder, "g"), replacement); + return html.replace(new RegExp(escapedPlaceholder + "(?!\\d)", "g"), replacement); } function extractHtmlContent(htmlPath: string): string {