[debate: failed] fix(reverse_sync): code span 뒤 공백이 소실되는 문제를 수정합니다#979
Open
[debate: failed] fix(reverse_sync): code span 뒤 공백이 소실되는 문제를 수정합니다#979
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
[debate-review][sha:bee8454fbfba5b34451cf65f94a769e9601feb34] Consensus reached after 2 rounds. No actionable issues remain. |
Contributor
Author
|
[debate-review][sha:0f41c45496e5bb8f5999cf30282f4e719a8c8ac8] Consensus reached after 3 rounds. Debate Summary
Withdrawn Findings
|
3 tasks
jk-kim0
added a commit
that referenced
this pull request
Apr 4, 2026
## Summary - `navigable_string_as_markdown()`에서 `re.sub(r'\s+', ' ', text)` 연속 공백 정규화를 제거합니다 - HTML과 Markdown/MDX 모두 렌더링 시 연속 공백을 단일 공백으로 표시하므로, FC 변환 단계의 정규화는 불필요합니다 - 이 정규화는 XHTML 원본의 공백 정보를 손실시켜, reverse-sync 파이프라인에서 `collapse_ws` 보상 로직과 gap 공백 축소 등 불필요한 복잡도를 유발합니다 (PR #979 참조) ## 변경 내용 - `bin/converter/context.py`: 연속 공백 정규화 2줄 제거 - 7개 테스트케이스의 `expected.mdx` 및 `expected.roundtrip.json` 업데이트 ## 이력 이 정규화는 2025-07-25 PR #34 (`a0da79dd`)에서 `as_markdown()` 함수 추출 시 방어적으로 추가된 것으로, 특정 버그 수정이 아닌 HTML 텍스트 노드의 일반적인 공백 정규화 목적이었습니다. ## Test plan - [x] 변환 테스트 21/21 통과 - [x] pytest 938 passed - [x] reverse-sync 통합 테스트 42/42 통과 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
_apply_text_changes의 gap whitespace 축소 로직에서, gap 전체가 노드의
leading whitespace인 경우(gap_old <= leading) 축소된 gap만큼만 leading을
조정하도록 변경합니다. 기존에는 gap이 축소되면 leading을 전부 제거하여,
<code>{{..}}</code><span> 안의</span> 구조에서 span 선행 공백이 소실되었습니다.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
<code>{{..}}</code><span> 안의</span> 구조에서 gap이 2→1로 축소될 때
leading이 전부 제거되는 버그를 재현하는 테스트케이스입니다.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0f41c45 to
25b9f57
Compare
FC가 이중 공백을 보존하므로 original.mdx, improved.mdx의
`{{..}}` 뒤 공백을 1→2로 맞춥니다.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
[debate-review][sha:5abda6e94b92c4b0e025ab504a0380d60d87a731] Consensus reached after 2 rounds. No actionable issues remain. |
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의 gap whitespace 축소 로직에서, gap 전체가 노드의 leading whitespace인 경우leading = gap_new로 조정하도록 변경합니다<code>{{..}}</code><span> 안의</span>구조에서 span 선행 공백이 소실되었습니다Root Cause
collapse_ws가 XHTML text의 연속 공백을 1개로 축소한 후,_apply_text_changes의 gap 분석 로직이 이 축소를 감지하여 노드의 leading whitespace를 전부 제거했습니다. gap이 노드 자체의 leading whitespace인 경우에는 축소된 만큼만 조정해야 합니다.Test plan
make test-reverse-sync-bugs-one TEST_ID=883654669PASSmake test-reverse-sync-bugs— 43 passed, 0 failedmake test-convert— 21 passedmake test-reverse-sync— 43 passedmake test-skeleton— 18 passedmake test-image-copy— 1 passedmake test-xhtml-diff— 15 passedmake test-byte-verify— 21 passedmake test-render— 21 passed🤖 Generated with Claude Code