merger: handle last slide and trailing newline