Fix slub/dfgviewer#147 in ALTO parser
We have fixed https://github.com/slub/dfg-viewer/issues/147 rather quick & dirty. A better solution would involve fixing the issue directly in the ALTO parser of Kitodo.Presentation.
Your fix now allows to render text that has (HTML-encoded) newlines in it as well, but no SP (or not even multiple distinct TextLine elements). See here for an example. (This ALTO was produced by page-to-alto converter with --alto-version 2.0 --dummy-textline --dummy-word in effect.)
It would be great if that workaround would still work in the future (because full texts without true/correct textline and word segmentation are a valid use case).
But it also shows that it is important for readibility that at least some newlines appear / get rendered. In my example, newlines are already included in the string. But Presentation should also insert them between successive TextLines.
BTW, the ALTO download then removes the HTML-encoded newline characters – too bad!