Added ability to protect comments when --no-comments options is use for CLI init command

This commit is contained in:
Matt Stypa 2018-09-24 21:12:07 -05:00
parent 48387a8f8a
commit dbeeea4dbb

View File

@ -28,7 +28,7 @@ export const optionMap = {
*/
function stripBlockComments(input) {
return stripComments
.block(input)
.block(input, { keepProtected: true })
.replace(/\n\s*\n\s*\n/g, '\n\n') // Strip unnecessary line breaks
.trim()
.concat('\n')