Only condense safe spaces at the beginning and the end of the line