HWPX 미주/각주 prefixChar 파싱 — 마커 접두문자('문') 복원 (closes #1199)#1202
Merged
Conversation
parse_ctrl_endnote / parse_ctrl_footnote 가 suffixChar 만 읽고 prefixChar 분기가 없어 before_decoration_letter 가 0 으로 남음 → 미주 마커 "문N)" 가 "N)" 로 렌더(접두 탈락). suffixChar 와 대칭으로 prefixChar(코드포인트 u16) → before_decoration_letter 매핑 추가. 렌더 경로(format_endnote_marker_text)는 기존에 접두 지원. - 회귀 테스트 2건 추가 (prefixChar 매핑 / 누락 시 0 유지) - 검증: 한글 2022 PDF 9쪽 "문1)~문7)" 정합, 전체 테스트 통과 closes edwardkim#1199 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
|
머지 완료했습니다 (devel 검토 요약진단 — HWPX hp:endNote/hp:footNote 의 prefixChar(코드포인트 숫자, 47928=0xBB38 '문')를 parse_ctrl_endnote/parse_ctrl_footnote 가 suffixChar 와 달리 읽지 않아 before_decoration_letter 가 0 으로 남고 미주 마커 '문N)' 의 접두가 탈락. 렌더 경로는 이미 접두를 지원하므로 파서 단일 원인 — 정확한 진단입니다. 검증
파서 단일 파일(+118, 순수 추가)에 prefixChar 없으면 기존 동작(before=0)을 유지해 무회귀입니다. fork head 를 직접 push 하지 않고 메인테이너 로컬 --no-ff 로 통합했기 때문에 GitHub 가 자동으로 'Merged' 로 표시하지 못하나, 실제로는 머지 완료 상태입니다(PR head 가 devel 의 조상). PR 을 닫습니다. 연결 이슈 #1199 도 함께 닫습니다. 우측 단 '다른 풀이' 미표시(#1200, curve 도형)는 별개 사안으로 PR #1203 에서 다루고 있습니다. |
edwardkim
added a commit
that referenced
this pull request
Jun 1, 2026
- pr_1202_report.md 신규: HWPX 미주/각주 prefixChar '문' 복원, test 1896 passed, 9쪽 0→7/10쪽 0→6, 한글2022 PDF 정합, 시각 판정 통과, WASM 빌드 - pr_1202_review.md 판단 절 '예정'→'머지 완료' - orders/20260601.md PR #1202 완료 기록 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
edwardkim
added a commit
that referenced
this pull request
Jun 1, 2026
@planet6897 — 9쪽 '다른 풀이' curve 도형 외곽선이 <hp:seg> 417개로 인코딩됐으나 파서가 <hc:pt>만 읽어 미렌더. parse_shape_object() 에 b"seg" 분기 추가 (첫 seg 시작점 + 각 seg 끝점 → 폴리라인). 파서 단일, 순수 추가, curve 전용. 충돌 해소: #1202 머지 전 분기로 tests 모듈 텍스트 인접 충돌 — prefixChar 2건 + curve seg 1건 테스트 전부 보존. 본문 b"seg" 분기는 자동 머지. 검증: cargo test --tests 1897 passed 0 failed. 9쪽 외곽선 path d_len 15582 신규. 작업지시자 시각 판정 통과(9쪽 SVG↔PDF). Co-Authored-By: Claude Opus 4.8 <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.
문제 (closes #1199)
samples/3-09월_교육_통합_2022.hwpx910쪽 미주 마커 "문N)" 가 "N)" 로 렌더링됨 (접두문자 '문' 탈락). 한글 2022 PDF에는 "문1)""문7)" 로 표시.근본 원인
HWPX
<hp:endNote>/<hp:footNote>요소는 접두/접미문자를 코드포인트 숫자 속성으로 인코딩:prefixChar="47928"(0xBB38 '문'),suffixChar="65289"(0xFF09 ')').파서
parse_ctrl_endnote()/parse_ctrl_footnote()(src/parser/hwpx/section.rs) 가suffixChar만 읽고prefixChar분기가 없어before_decoration_letter가 0 으로 남음 →note_decoration_char(0)=None→ 접두 탈락. 렌더 경로(format_endnote_marker_text, typeset.rs)는 이미 접두를 지원하므로 파서 단일 원인.수정
두 함수에
suffixChar와 대칭으로b"prefixChar"분기 추가 → u16(코드포인트) 파싱하여before_decoration_letter설정. prefixChar 없으면 0(접두 없음) 유지.검증
cargo build --release/cargo test --release전체 통과, 회귀 0.문1)~문13)접두 복원.pdf/3-09월_교육_통합_2022.pdf) 9쪽문1)~문7)시각 정합.비고
우측 단 "다른 풀이" 미표시는 별개 사안(#1200, curve 도형 외곽선 미렌더링)으로 분리.