replace hardcoded newline with current name separator in Segment.toString()