Fix markerless line-break join gluing whole words without a space
TextBereiniger.verbindeUmbrueche assumed any letter-ending, no-trailing-space
line followed by a lowercase continuation was a hyphen-less mid-word split
(PDF extraction artifact) and joined it with zero separator. That assumption
breaks for deliberate word-boundary breaks, e.g. the short-label/hanging-
indent definition format in the UWG Anhang ("...Nachhaltigkeitssiegels" +
"das Anbringen..."), producing glued words in the rendered synopsis.
Gate the markerless join on the candidate line reaching a locally-typical
"full column width" (90th percentile in a ±20-line window), since automatic
wraps always land near the column edge while deliberate breaks don't. The
window is local rather than document-wide because some source PDFs mix
column widths within one document (narrower Regelungstext vs. wider
Begründung), which a global statistic would otherwise penalize.
Also route the single-unit Neufassung fallback through the existing
normalisiereZitatText normalization, matching its sibling code paths, so
that internal line breaks now more often preserved by the fix above don't
leak into the HTML output as spurious line breaks instead.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Change-Id: I0a79f22f9286cd4a90eea32bad9b54cb4a082cf4
5 files changed