fix(layout): lay a table cell out at its width on the table grid - #392
Merged
Merged
Conversation
The cells of a column need not be as wide as each other (hp:cellSz). Hancom lays a cell out on the table's grid: the columns are stacked from the left, each ending at the farthest of its cells' starts plus their widths (and the table's cell spacing), so a column is as wide as its widest cell of its own and a merged cell wider than its columns widens the last of them. A cell reaches from its first column's start to its last column's end, wider than its own width when another row pushes those ends apart. Cell lines without a cache are now broken, and rows measured, at that width. 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.
바뀐 점
쪽 수 추정(실험,
estimate_pages)이 표 칸의 글을 칸 자신의 폭(hp:cellSz)에서 나누던 것을 고친다. 같은 열의 칸들이 폭이 다르면, 한/글은 칸을 표 격자의 폭으로 놓는다.hp:tbl@cellSpacing)이 있으면 간격도 더한다._grid_widths가 표마다 칸의 격자 폭을 구한다._table_rows가 그 폭을_cell_row에 넘기고, 줄 캐시가 없는 칸의 줄 나눔과 행 높이를 그 폭으로 센다.테스트
tests/test_layout_page_estimate.py의HANCOM_PAGES에 한/글 저장본 넷을 더한다.test_a_table_with_cell_spacing_lays_its_cells_out_at_their_own_widths: 칸 간격 198인 표와 간격 없는 대조 저장본이다.🤖 Generated with Claude Code