fix(styles): 문단 정렬에 한컴의 나눔 정렬(DISTRIBUTE_SPACE)을 받는다 - #205
Merged
Merged
Conversation
apply_paragraph_format(alignment=...) knew DISTRIBUTE but refused DISTRIBUTE_SPACE, Hancom's space distribution (나눔 정렬), as an unsupported alignment, though documents Hancom writes carry it and python-hwpx reads it. It is now accepted in any case. Co-Authored-By: Claude Opus 5.5 <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.
요약
apply_paragraph_format(alignment=...)가 한컴의 나눔 정렬DISTRIBUTE_SPACE를 받게 합니다.지금은 배분 정렬
DISTRIBUTE만 받고DISTRIBUTE_SPACE는 "unsupported paragraph alignment"로 거부합니다. 한컴이 저장한 문서에 이 값이 있고, python-hwpx도 읽을 때는 그대로 둡니다. 한컴은 두 값을 다르게 그립니다. 배분 정렬은 마지막 줄을 글자 단위로 벌리고, 나눔 정렬은 낱말 단위로 벌립니다.변경
oxml/header_part.py_normalize_paragraph_alignment(): 정렬 별칭 표에DISTRIBUTE_SPACE를 더했습니다. 대소문자는 가리지 않습니다.tests/test_paragraph_align_distribute_space.py: 테스트 3개를 추가했습니다. 모두 수정 전에 실패합니다.DISTRIBUTE_SPACE와distribute_space를 받아hh:align horizontal="DISTRIBUTE_SPACE"로 씁니다.CHANGELOG.md에 고침 항목을 추가했습니다.검증
scripts/check_typing_generics_scope.py,scripts/error_code_census.py --check,scripts/check_public_hygiene.py통과.🤖 Generated with Claude Code