Skip to content

fix(form_fit): let closing punctuation after a space start a line - #499

Merged
airmang merged 1 commit into
mainfrom
fix/form-fit-line-end-rules
Oct 17, 2026
Merged

airmang merged 1 commit into
mainfrom
fix/form-fit-line-end-rules

Conversation

@airmang

@airmang airmang commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • FormFit and the page estimate never started a line with a closing punctuation mark (!, ?, ), %, 」, · and the other characters in _NO_LINE_START). So when such a mark stood after a space, they moved the word before the space down with it, and the line held one word less than Hancom Office puts on it.
  • Hancom starts a line with the mark when a space comes before it. Until now only the ellipsis was allowed to do that (fix(form_fit): let an ellipsis after a space start a line #481).
  • A mark attached to the character before it still moves down with that character.

Test plan

  • Two Hancom-saved fixtures (pages_closing_bracket_after_a_space_starts_a_line, pages_percent_after_a_space_starts_a_line): every paragraph's line starts match the saved line layout, and the page estimate without caches matches. These tests fail before the fix.
  • Lint, format, type checks and the other repository gates
  • Layout and FormFit tests; full test suite: no new failures

🤖 Generated with Claude Code

@airmang airmang left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

검토 완료. 닫는 문장부호가 앞 글자에 붙은 경우의 기존 금칙과 공백 뒤 줄 시작 예외, break opportunity 및 opening punctuation 조건을 확인했습니다. 정확한 head에서 관련 FormFit/쪽 수 추정 테스트 132개가 통과했고, 전체 CI 및 실제 Python 3.12 로그(6868 passed, 18 skipped, 1 xfailed; coverage 90.00%; Ruff·mypy·Pyright·공개 게이트 통과)를 확인했습니다. 검토 범위에서 추가 결함은 발견하지 못했습니다. 다만 #498 병합 후 최신 main 467d1d2c71cc069832a78ea563f58d1b96da7d6e와 CHANGELOG.md 내용 충돌을 git merge-tree로 확인해 병합을 보류합니다. 두 변경 기록을 보존하여 충돌을 해결한 새 head에서 검사와 통합 결과를 재검증해야 합니다.

FormFit and the page estimate kept every closing punctuation mark (`!`, `?`, `)`, `%`, `」`, `·` and the
others that never start a line) off the start of a line, and so moved the word before a space-separated mark
down with it. Hancom Office starts a line with such a mark when a space comes before it, as it already did with
the ellipsis; a mark attached to the character before it still moves down with that character. Two
Hancom-saved fixtures hold paragraphs breaking so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@airmang
airmang force-pushed the fix/form-fit-line-end-rules branch from 1d60f95 to 511961e Compare October 17, 2026 05:33

@airmang airmang left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 511961e against main 467d1d2. The rebased change preserves the opening-punctuation guard and permits closing punctuation after hanging spaces; inspected both the width-search path and Hancom line-start fixtures, including cache/no-cache agreement. The new head differs from the previously reviewed implementation only in its rebase/CHANGELOG placement. Locally, 136 related FormFit/layout tests passed. Verified successful CI workflow head SHA and read its test/lint/type/hygiene log: 6,872 passed, 18 skipped, 1 xfailed; all 13 PR checks pass. No unresolved findings; ready for a SHA-guarded squash merge. COMMENT used because this authenticated account owns the PR.

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