fix: HWPX 렌더링 버그 수정 — underline/strikeout/내어쓰기#225
Open
hulryung wants to merge 2 commits into
Open
Conversation
- hwpx-parser: underline type="NONE"이면 밑줄 설정하지 않음 - hwpx-parser: strikeout shape="NONE"이면 취소선 설정하지 않음 - doc_html: underline/strikeout shape=None일 때 <u>/<del> 태그 렌더링 제외 - doc_html: 음수 text-indent(내어쓰기)에 left margin이 부족하면 padding-left 보정
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.
Summary
HWPX 문서 렌더링 시 발생하는 3가지 버그를 수정합니다.
1. underline/strikeout이 모든 텍스트에 적용되는 문제
<underline type="NONE" shape="SOLID"/>처럼type="NONE"인 경우에도Some(Underline {...})로 파싱되어 모든 텍스트에<u>태그가 적용됨<strikeout shape="NONE"/>도 마찬가지로Some(Strikeout {...})로 파싱되어<del>태그 적용type="NONE"/shape="NONE"이면 설정하지 않고, 렌더러에서도shape=None검사 추가2. 음수 text-indent(내어쓰기)로 텍스트 앞부분이 잘리는 문제
text-indent: -71.8pt처럼 음수 indent가 있을 때margin-left가 0이면 첫 줄 텍스트가 컨테이너 밖으로 밀림abs(indent) > left일 때 차액만큼padding-left보정 추가변경 파일
crates/hwpx-parser/src/header.rs— underline/strikeout 파싱 조건 추가crates/hwp-core/src/viewer/doc_html/paragraph.rs— shape=None 검사 + padding-left 보정crates/hwp-core/src/viewer/doc_html/layout_text.rs— shape=None 검사Test plan
type="BOTTOM")는 정상 렌더링되는지 확인