Collapse newlines between namespace close braces