mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-27 03:27:21 -06:00
Chinese and Japanese are written without spaces between words, so wrapping only at spaces left a paragraph of them as a single overlong row. A row may now also end between two ideographs or kana (UAX #14 class ID), except before closing punctuation, closing brackets, small kana and similar marks, or after opening brackets and currency signs (JIS X 4051 line-start and line-end rules). Latin words inside such text stay whole; Korean and Thai still break only at spaces. Both the plain and the styled rewrite paths use the same rule. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>