d31acf1063
splitByHeuristicsImpl handles documents that lack proper Markdown headings but contain other structural cues — form-feeds, numbered sections, multilingual chapter markers (DE/EN/ZH), all-caps section titles, visual separators (---/===), repeated page footers, and runs of blank lines. Boundaries are sorted by position; greedy bin-packing fills chunks up to cfg.ChunkSize and oversize blocks between two boundaries fall back to the legacy splitter for inner segmentation. Boundary detection skips fenced code blocks and de-duplicates overlapping offsets keeping the highest-priority candidate. https://claude.ai/code/session_01XADhx6mtu2ZYW3DE9Lun6k