Improve auto-paragraph to preserve newlines and handle edge-cases better.