fix(reverse_sync): roundtrip_verifier H1·테이블 패딩 정규화 추가#907
Merged
Conversation
This was referenced Mar 11, 2026
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
aff822b to
e67e470
Compare
9f5c927 to
9a61179
Compare
jk-kim0
added a commit
that referenced
this pull request
Mar 12, 2026
## Description `verify_roundtrip`의 strict 모드에서도 forward converter의 체계적 출력 특성에 의한 차이를 정규화하여 false negative를 줄입니다. **추가된 최소 정규화 (strict/lenient 공통 적용):** - `_normalize_consecutive_spaces_in_text`: 코드 블록 외 영역에서 2개 이상 연속 공백을 단일 공백으로 정규화 - 배경: `improved.mdx`에 `**bold** :` 형태의 이중 공백이 있어도 forward converter는 단일 공백으로 출력 - `_normalize_br_space`: `<br/>` 앞의 공백 제거 - 배경: forward converter가 `' '.join(li_itself)`로 `<br/>` 앞에 공백을 추가 **변경하지 않은 것:** - `_normalize_trailing_ws`는 최소 정규화에 포함하지 않음 (strict 모드의 trailing whitespace 검사 보존) ## Added/updated tests? - [x] Yes `TestNormalizeConsecutiveSpaces` (5개), `TestNormalizeBrSpace` (5개), 통합 테스트 3개 추가 — 총 22개 테스트 통과 ## Stacked PRs 이 PR은 stacked PR 시리즈의 일부입니다: - #906 (이 PR): 최소 정규화 (`_apply_minimal_normalizations`) - #907: `_normalize_table_cell_padding` 추가 - #908: `_normalize_trailing_ws` lenient 모드 이동 --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
9b7e018 to
c6d5659
Compare
c6d5659 to
5e47e47
Compare
Forward converter 특성에 의한 체계적 차이를 최소 정규화에 추가합니다.
- `_normalize_table_cell_padding`을 `_apply_minimal_normalizations`으로 이동합니다:
- 셀 내 연속 공백을 단일 공백으로 정규화
- 구분자 행(`| --- |`)의 대시 수를 3개로 정규화 (컬럼 폭 차이 무시)
- `_strip_first_heading` + `lstrip('\n')` 추가: Forward converter가 H1을 페이지 제목으로 처리하므로 비교에서 제외합니다.
- `_normalize_trailing_blank_lines` 추가: 후미 빈 줄을 정규화합니다.
- `_normalize_trailing_ws`를 `_apply_normalizations`(lenient 모드)에 복원합니다: `_apply_minimal_normalizations` 추출 시 실수로 제거됨.
- `tests/reverse-sync/544178422/improved.mdx`: "All User" figure의 alt·figcaption을 `접근차단` → `접근 차단`으로 수정합니다 (Admin/Each User 표기와 통일, 표준 맞춤법 적용)
- `tests/reverse-sync/pages.yaml`: PASS 전환된 3개 케이스의 expected_status를 fail → pass로 업데이트합니다 (1456144391, 1495433217, 544178422)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5e47e47 to
94c1b91
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.
Description
Forward converter가 H1을 페이지 제목으로 처리하고 테이블 셀 폭을 임의로 조정하는 체계적 차이를 정규화합니다.
roundtrip_verifier.py:_apply_minimal_normalizations에 추가_normalize_table_cell_padding: 셀 내 연속 공백을 단일 공백으로, 구분자 행(| --- |)의 대시 수를 3개로 정규화_strip_first_heading+lstrip('\n'): Forward converter가 H1을 페이지 제목으로 처리하므로 비교에서 제외_normalize_trailing_blank_lines: 후미 빈 줄 정규화roundtrip_verifier.py:_normalize_trailing_ws를_apply_normalizations(lenient 모드)에 복원tests/reverse-sync/544178422/improved.mdx: "All User" figure의 alt·figcaption을접근차단→접근 차단으로 수정 (Admin/Each User 표기와 통일, 표준 맞춤법 적용)tests/reverse-sync/pages.yaml: PASS 전환된 3개 케이스의expected_status를fail→pass로 업데이트 (1456144391, 1495433217, 544178422)추가 PASS 케이스
1456144391, 1495433217, 544376183, 873136365, 544178422
Added/updated tests?
🤖 Generated with Claude Code