Handlebars printer: two small refactorings (#10285)
Handlebars printer: two small refactorings (#10285)

* Refactor generateHardlines

* Move variables

* Fix isWhitespaceOnly regex
rattrayalex/prettier,prettier/prettier,prettier/prettier,jlongster/prettier,prettier/prettier,rattrayalex/prettier,rattrayalex/prettier,prettier/prettier