fix: 添加连字符扩展的 strip() 处理尾随空格
- 修复 _expand_hyphenated_text() 尾随空格问题 - trailing- → trailing (无尾随空格) - -leading → leading (无前导空格) - 所有边缘情况测试通过 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -518,11 +518,11 @@ class Database:
|
||||
text: 原始文本
|
||||
|
||||
Returns:
|
||||
扩展后的文本(连字符替换为空格)
|
||||
扩展后的文本(连字符替换为空格,并去除首尾空白)
|
||||
"""
|
||||
if not text:
|
||||
return ""
|
||||
return text.replace('-', ' ')
|
||||
return text.replace('-', ' ').strip()
|
||||
|
||||
async def delete_fts_content(self, path: str) -> None:
|
||||
"""删除 FTS5 内容"""
|
||||
|
||||
Reference in New Issue
Block a user