confluence-mdx: reverse_sync 블록 경계에서 insert가 다음 리스트 항목으로 넘치는 오류 수정#851
Merged
confluence-mdx: reverse_sync 블록 경계에서 insert가 다음 리스트 항목으로 넘치는 오류 수정#851
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 task
## Description - `_apply_text_changes`에서 `<ul>` 내 서로 다른 `<li>` 항목의 텍스트 노드 경계에서 insert opcode가 잘못된 항목에 할당되는 문제를 수정합니다. - `_map_text_range`에 `include_insert_at_end`, `exclude_insert_at_start` 파라미터를 추가하여 블록 경계에서의 insert 할당을 제어합니다. - `_find_block_ancestor` 헬퍼를 추가하여 텍스트 노드의 블록 레벨 부모를 감지합니다. - right 노드 내부에 자체 변경이 있으면 boundary insert를 right에 유지하고, 없으면 left 노드에 할당하는 휴리스틱을 적용합니다. ### Background flat list의 containing block 전략에서 `<ul>` xpath로 전체 리스트의 텍스트를 패치할 때, 항목 끝에 추가된 텍스트(예: "이슈 해결")가 `SequenceMatcher`의 insert opcode로 생성되는데, half-open range `[start, end)` 조건 때문에 경계 위치의 insert가 다음 `<li>`의 텍스트 노드에 할당되어 "해결[Privilege Type]..."과 같이 항목이 뒤섞이는 문제가 있었습니다. ## Added/updated tests? - [x] Yes - `test_flat_list_append_text_stays_in_same_item` — 항목 끝 텍스트 추가 시 같은 항목에 유지 - `test_flat_list_append_text_multiple_items` — 다수 항목 동시 추가 검증 - `test_flat_list_prepend_bracket_stays_in_correct_item` — bracket 삽입이 right에 유지 (회귀 방지) - `test_flat_list_append_text_at_end_of_item` — patch_builder 레벨 검증 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0252e4f to
f682aa1
Compare
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.
Summary
_apply_text_changes에서<ul>내 서로 다른<li>항목의 텍스트 노드 경계에서 insert opcode가 잘못된 항목에 할당되는 문제를 수정합니다._find_block_ancestor헬퍼와_map_text_range의 boundary insert 제어 파라미터를 추가하여 블록 경계에서의 insert 할당을 올바르게 처리합니다.11.1.0-11.1.2.mdx,9.10.0-9.10.4.mdxTest plan
test_flat_list_append_text_stays_in_same_item— 항목 끝 텍스트 추가 시 같은 항목에 유지 확인test_flat_list_append_text_multiple_items— 다수 항목 동시 추가 검증test_flat_list_prepend_bracket_stays_in_correct_item— bracket 삽입이 right에 유지 (회귀 방지)bin/reverse_sync_cli.py verify— 11.1.0-11.1.2.mdx, 9.10.0-9.10.4.mdx PASS 확인🤖 Generated with Claude Code