fix(reverse_sync): heading 내 Badge 컴포넌트 roundtrip 소실을 수정합니다#982
Merged
fix(reverse_sync): heading 내 Badge 컴포넌트 roundtrip 소실을 수정합니다#982
Conversation
`convert_heading_inline()`과 `_convert_heading()`에서 `<Badge>` → `<ac:structured-macro ac:name="status">` 변환이 누락되어, heading 변경 시 Badge가 `[badge]` 형태로 깨지는 문제를 수정합니다. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
[debate-review][sha:c0670e8554ba4651300e42b1b22d859b2d6eef48] Consensus reached after 2 rounds. No actionable issues remain. |
emit_block → XHTML → FC → MDX 전체 경로를 검증하는 테스트 4건: - Badge 추가: status macro 생성 확인 - 컬러 변경: colour 파라미터 반영 확인 - 텍스트 변경: title 파라미터 반영 확인 - Badge 삭제: status macro 부재 확인 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
_emit_heading_xhtml이 _emit_replacement_fragment의 emit_block 단계만 재현한다는 점과, sidecar/lost_info가 Badge heading에서는 개입하지 않는다는 점을 명시합니다. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…설명을 추가합니다 Co-Authored-By: Claude Opus 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.
Description
heading 변경 시
<Badge color="grey">10.2.2</Badge>가 roundtrip에서[badge]10.2.2로 깨지는 문제를 수정합니다.원인
heading은
_CLEAN_BLOCK_TYPES로 분류되어replace_fragment전략을 사용합니다. 이 전략은_emit_replacement_fragment()→emit_block()→convert_heading_inline()경로를 거치는데,convert_heading_inline()(mdx_to_storage/inline.py)에서<Badge>→<ac:structured-macro ac:name="status">변환이 누락되어 있었습니다.MDX
<Badge>태그가 그대로 XHTML에 삽입 → BeautifulSoup이 소문자<badge>로 변환 → FC가 인식 불가 →[badge]형태로 출력.변경 내용
mdx_to_storage/inline.py:convert_heading_inline()에_BADGE_INLINE_RE.sub(_replace_badge, ...)추가 (주 경로)reverse_sync/mdx_to_xhtml_inline.py:_convert_heading()에도 동일한 Badge 변환 추가 (mdx_block_to_inner_xhtml경로 대응)Badge 시나리오별 지원
heading은
replace_fragment전략으로 improved MDX 기준 XHTML 전체 재생성하므로, 아래 시나리오 모두 지원됩니다:<ac:structured-macro ac:name="status">생성<ac:parameter ac:name="colour">반영<ac:parameter ac:name="title">반영검증
Added/updated tests?
emit_block→ XHTML → FC → MDX)🤖 Generated with Claude Code