1
0

fix: 优化思源笔记转换脚本,处理特殊符号 < >

This commit is contained in:
2025-10-12 18:34:33 +08:00
parent 309cb5d369
commit a563263b8d

View File

@@ -87,7 +87,7 @@ function markdownTableToJson(markdownTable = '') {
for (let i = indexJson.length - 1; i >= 0; i--) { for (let i = indexJson.length - 1; i >= 0; i--) {
let item = indexJson[i]; let item = indexJson[i];
let oldName = (item['title'] + '.md').replace(/("|:)/g, '_'); let oldName = (item['title'] + '.md').replace(/[":<>]/g, '_');
let oldPath = join(markdownDir, oldName); let oldPath = join(markdownDir, oldName);
let newName = item['slug'] + '.md'; let newName = item['slug'] + '.md';
let newPath = join(markdownDir, newName); let newPath = join(markdownDir, newName);