Added check to see if endIndex token is comment and append EOL if it is

This is to fix #630
Yes, just that one case to prove fix works for indented array ;)