Skip to content

v2.10.2

Choose a tag to compare

@github-actions github-actions released this 06 Jun 14:17
· 88 commits to main since this release

[2.10.2] - 2026-06-06

추가

  • hwpx.tools.markdown_export.export_markdown()HwpxDocument.export_rich_markdown()을 추가해 풍부한 Markdown 변환을 지원합니다. 인라인 서식(굵게/기울임/취소선/색상/하이라이트), 표 병합 셀(colspan/rowspan HTML), 중첩 표 재귀, rect/ellipse/polygon 도형 내부 paragraph, BinData 이미지 추출, Ⅰ./1. 패턴 기반 헤딩 감지(# /## ), 각주·미주(정확 위치 마커 + fn1/en1 일련번호 + 본문 인라인 서식), 하이퍼링크([text](url)) 보존을 한 번에 처리합니다. 기존 HwpxDocument.export_markdown()은 그대로 유지됩니다.
  • HwpxOxmlNote에 본문 paragraph 접근/편집 helper를 추가했습니다: body_paragraph property, add_run(text, *, char_pr_id_ref=..., bold=..., italic=..., underline=..., color=..., font=..., size=..., highlight=..., strike=..., attributes=...), add_hyperlink(url, display_text, *, char_pr_id_ref=...). XML 직접 조작 없이 각주 본문에 혼합 서식 run과 하이퍼링크를 추가할 수 있습니다.
  • get_table_map() 결과에 본문 표 anchor location, 셀 문단별 table_cell_paragraph location, caption_text, preceding_paragraph_text를 추가했습니다.
  • 새 컨버터와 helper에 대한 회귀 테스트를 tests/test_markdown_export.py에 추가했습니다.

변경

  • HwpxOxmlTableCell.text가 셀 내부 여러 문단을 줄바꿈으로 보존하고, set_text(..., preserve_format=True, split_paragraphs=True) 경로에서 기존 run charPrIDRef를 유지하도록 개선했습니다.

수정

  • HwpxOxmlParagraph.add_footnote()/add_endnote()char_pr_id_ref 인자가 외부 호스팅 run에만 적용되고 각주 본문 run은 항상 charPrIDRef="0"으로 하드코딩되던 문제를 수정했습니다. 인자가 사용자 의도대로 본문 run에도 적용됩니다.