Simplify code that adds vertical space

Minor modification that uses `componentsJoinedBySubstring` instead of a loop that does basically the same.