confluence-mdx: Phase 2 + Phase 3 — clean block replacement 및 inline-anchor 재구성#902
Open
confluence-mdx: Phase 2 + Phase 3 — clean block replacement 및 inline-anchor 재구성#902
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
d12dd8a to
9b4a715
Compare
5439392 to
51b8c40
Compare
51b8c40 to
c92817d
Compare
710a8e6 to
55bd453
Compare
c92817d to
3be48ec
Compare
3be48ec to
3ffb486
Compare
3ffb486 to
9e0d43b
Compare
651cf24 to
8df7202
Compare
4c7e2a6 to
376a611
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…anchor entry 추출 구현 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…se로 p 탐색 범위 제한 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lper 구현 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t tracking 수정
find(string=) 검색 대신 직접 참조(pivot)를 유지하여 동일 텍스트가 여러 번
나타날 때 잘못된 노드를 찾는 문제와 find('ac:image')가 다른 이미지를 찾는
문제를 수정합니다.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…경로 연동 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Phase 2: Clean block whole-fragment replacement
paragraph/heading/code/table 등 XHTML 비보존 요소를 포함하지 않는 "clean block"에 대해 MDX를 XHTML로 재변환하여 전체 fragment를 교체하는
replace_fragmentpatch action을 구현합니다.변경 파일:
bin/reverse_sync/patch_builder.py—replace_fragment패치 생성 로직bin/reverse_sync/xhtml_patcher.py—replace_fragment액션 처리bin/reverse_sync/sidecar.py— RoundtripSidecar v3 reconstruction 메타데이터tests/test_reverse_sync_reconstruction_goldens.py— golden test 2개Phase 3: Inline-anchor (ac:image) 재구성
paragraph 내부의
ac:image를 보존하면서 텍스트 변경을 반영하는 reconstruction pipeline을 구현합니다.핵심 흐름:
sidecar.py:_build_anchor_entries로 paragraph의ac:image위치(offset + raw XHTML)를 sidecar에 기록reconstructors.py(신규): difflib 기반 offset 매핑 + DOM 삽입 helperpatch_builder.py:anchors가 있는 paragraph에 reconstruction 경로 연동변경 파일:
bin/reverse_sync/sidecar.py—_build_anchor_entries추가,_build_reconstruction_metadata갱신bin/reverse_sync/reconstructors.py(신규) —map_anchor_offset,insert_anchor_at_offset,reconstruct_inline_anchor_fragmentbin/reverse_sync/patch_builder.py— inline-anchor reconstruction 경로 추가tests/test_reverse_sync_reconstruction_goldens.py— 파서 불일치 수정 + golden test 10개tests/test_reverse_sync_reconstruct_paragraph.py(신규) — unit + integration testTest Plan
python3 -m pytest tests/ -q— 886 tests all passtest_reverse_sync_reconstruction_goldens.py— 10개 golden test 모두 greentest_reverse_sync_reconstruct_paragraph.py— unit/integration test 모두 green🤖 Generated with Claude Code