[core][js][py] text.getParagraph(): end of line handling