Skip to content

refactor(reverse_sync): 리스트 마커 공백 감지를 별도 함수로 분리하고 collapse_ws를 제거합니다#984

Open
jk-kim0 wants to merge 1 commit intomainfrom
jk/fix-reverse-sync-inline-boundary-whitespace
Open

refactor(reverse_sync): 리스트 마커 공백 감지를 별도 함수로 분리하고 collapse_ws를 제거합니다#984
jk-kim0 wants to merge 1 commit intomainfrom
jk/fix-reverse-sync-inline-boundary-whitespace

Conversation

@jk-kim0
Copy link
Copy Markdown
Contributor

@jk-kim0 jk-kim0 commented Apr 5, 2026

Summary

  • _normalize_list_for_content_compare에서 marker_ws prefix를 출력에 포함하던 방식을 제거하고, _has_marker_ws_change로 별도 감지하도록 변경
  • collapse_ws 호출을 replace('\n', ' ').strip()으로 교체하여 XHTML 정렬
  • preserved anchor 리스트에서 marker-ws-only 변경이 no-op 패치를 생성하는 문제 해소

변경 내용

파일 변경
patch_builder.py _normalize_list_for_content_compare: current_marker_ws 제거, 항목별 .strip() 추가
patch_builder.py _has_marker_ws_change: 마커 뒤 공백 변경 별도 감지 함수 추가
patch_builder.py collapse_ws(_old_plain_raw)_old_plain_raw.replace('\n', ' ').strip()
patch_builder.py has_any_changehas_marker_ws_change 포함

Added/updated tests?

  • Yes — marker ws 단위 테스트 갱신 + _has_marker_ws_change 테스트 5건 추가
  • 통합 테스트 43건, 단위 테스트 129건 통과

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
querypie-docs Ready Ready Preview, Comment Apr 7, 2026 3:08am

Request Review

@jk-kim0 jk-kim0 self-assigned this Apr 6, 2026
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-inline-boundary-whitespace branch from 8ff1ab0 to 21b9b91 Compare April 6, 2026 15:22
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-inline-boundary-whitespace branch from 21b9b91 to 53b154a Compare April 7, 2026 02:59
@jk-kim0 jk-kim0 changed the title fix(reverse_sync): XHTML 인라인 요소 경계의 연속 공백을 정규화합니다 refactor(reverse_sync): 리스트 마커 공백 감지를 별도 함수로 분리하고 collapse_ws를 제거합니다 Apr 7, 2026
…리합니다

_normalize_list_for_content_compare에서 marker_ws prefix를 출력에 포함하던 방식을
제거하고, _has_marker_ws_change로 별도 감지하도록 변경합니다.

이로써 collapse_ws 호출 없이 replace('\n', ' ').strip()만으로 XHTML 정렬이
가능해지며, preserved anchor 리스트에서 marker-ws-only 변경이 no-op 패치를
생성하는 문제가 해소됩니다.

- _normalize_list_for_content_compare: current_marker_ws 제거, 항목별 strip 추가
- _has_marker_ws_change: 마커 뒤 공백 변경 별도 감지 함수 추가
- collapse_ws(_old_plain_raw) → _old_plain_raw.replace('\n', ' ').strip()
- has_any_change에 has_marker_ws_change 포함
- 테스트: 기존 marker ws 단위 테스트 갱신 + _has_marker_ws_change 테스트 5건 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jk-kim0 jk-kim0 force-pushed the jk/fix-reverse-sync-inline-boundary-whitespace branch from 53b154a to 4e83359 Compare April 7, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant