trim the result, not the input, and get better results
Merge branch 'docprep_paste' into testing