Improve section spacing regex and update unit tests.