Fix for routes task

This commit fixes formatting issue for `rake routes` task, when a section is shorter than a header.
Merge pull request #12975 from sbagdat/fix-for-rake-routes

Fix for routes task