Skip to content

Commit b5fa8bf

Browse files
committed
🔧 保留文件名完整性:移除特殊前缀清理逻辑
- 保留文件名中的所有特殊前缀(∑»§等) - 直接使用完整文件名作为title字段 - 尊重用户原有的文件命名体系和组织逻辑
1 parent 04382b5 commit b5fa8bf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sync_notes.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,8 @@ def clone_source_repo(self):
5757
def get_title_from_filename(self, filepath):
5858
"""从文件名提取标题"""
5959
filename = Path(filepath).stem # 去掉扩展名
60-
# 移除一些特殊前缀
61-
title = re.sub(r'^[∑»§_\d\-\s]+', '', filename).strip()
62-
# 如果清理后为空,使用原始文件名
63-
if not title:
64-
title = filename
65-
return title
60+
# 直接使用完整的文件名作为标题,保留所有特殊前缀
61+
return filename
6662

6763
def parse_frontmatter(self, content):
6864
"""解析 frontmatter"""

0 commit comments

Comments
 (0)