Correctly implement <pre> handling