fix(markdownparser): ensure merged filenames unique#1006
Closed
sponge225 wants to merge 1 commit into
Closed
Conversation
|
Failed to generate code suggestions for PR |
Collaborator
|
solve by #1005 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
导入 Markdown( ov add-resource )时,若文档中存在大量重复同名标题(例如重复的顶级 # ... ), MarkdownParser 会把多个“小节”合并输出为 *_Nmore.md
旧的合并命名策略在 count > 1 时仅使用 {first}_{count}more ,在“重复标题 + 多次 merge 批次”场景下会产生同名文件,导致解析阶段写入覆盖/内容丢失
Related Issue
Closes #1004
Type of Change
Changes Made
仅调整合并文件命名逻辑: count > 1 时在 {first}_{count}more 后追加基于合并内容的短 hash(8 位),生成 {first}_{count}more_{hash8} ,确保不同合并批次的输出文件名稳定且唯一。
Testing
Checklist
Screenshots (if applicable)
Additional Notes