Render nbsp on empty lines to ensure they have a non-zero height

Fixes #2958