Fix output vertical mode to render correctly with comments