Update the `preprocess`-function to avoid adding trailing new-lines (issue 14902)
Update the `preprocess`-function to avoid adding trailing new-lines (issue 14902)

*This is a follow-up to PR 14886, which "broke" this.*

In addition to fixing the issue, using an Array and `join`-ing it at the end may also be a tiny bit more efficient than using a growing string.

mozilla/pdf.js,mozilla/pdf.js,mozilla/pdf.js,nawawi/pdf.js,nawawi/pdf.js,Shoobx/pdf.js,nawawi/pdf.js,showpad/mozilla-pdf.js,timvandermeij/pdf.js,Shoobx/pdf.js,timvandermeij/pdf.js,showpad/mozilla-pdf.js,showpad/mozilla-pdf.js,Snuffleupagus/pdf.js,timvandermeij/pdf.js,Snuffleupagus/pdf.js,Snuffleupagus/pdf.js,Shoobx/pdf.js