You can achieve it by removing the spaces at the end of each line. Workflow in Sublime is:
option+command+F which is find and replaceoption+command+RDecide how many spaces from the end need to be deleted. Let's say at least 4 spaces,
* and replace it nothing.