* Ensure empty lines are copiable and final new line too
When files are highlighted the newline character needs to be added in a whitespace
compliant mode. Also ensure the final empty newline is rendered.
Fix #16434
* Add test and ensure spans closed
Signed-off-by: Andrew Thornton <art27@cantab.net>