Fix the line preservation between jsdoc comments while displaying it

Fixes #891
Simplified while loop as per code review feedback
Merge pull request #1086 from Microsoft/jsDocCommentLinePreservation

Fix the line preservation between jsdoc comments while displaying it