DSSSM-1105 #time 37m Refactoring the handling for cases in which spaces are structured as newlines