diff --git a/scripts/convert-siyuan-notes.mjs b/scripts/convert-siyuan-notes.mjs index 71b0b41..9e1ad5c 100644 --- a/scripts/convert-siyuan-notes.mjs +++ b/scripts/convert-siyuan-notes.mjs @@ -13,6 +13,7 @@ function markdownTableToJson(markdownTable = '') { return line .replace(/^\||\|$/g, '') // 移除首尾的管道符号 .replace(/\\/g, '') // 移除转义符号 + .replace(//g, '') // 移除换行标签 .split('|') .map(cell => cell.trim()); }; @@ -86,7 +87,7 @@ function markdownTableToJson(markdownTable = '') { for (let i = indexJson.length - 1; i >= 0; 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 newName = item['slug'] + '.md'; let newPath = join(markdownDir, newName);