fix: use full page ID in saved filename to prevent collisions

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-16 14:34:01 +00:00
parent 0f6a685a13
commit cbfd2315c9
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ async function main() {
// 5. 可选:保存到文件
if (outputDir) {
var safeTitle = title.replace(/[^a-zA-Z0-9\u4e00-\u9fa5_-]/g, '_').slice(0, 80);
var filename = safeTitle + '-' + pageId.slice(0, 8) + '.md';
var filename = safeTitle + '-' + pageId.replace(/-/g, '') + '.md';
var outputPath = path.join(outputDir, filename);
var fileContent = '# ' + title + '\n\n';