Skip to content

Commit

Permalink
Change header body to follow same line endings as default
Browse files Browse the repository at this point in the history
Resolves: guiguan#55
  • Loading branch information
Ryan Schwartz committed Jun 16, 2018
1 parent 8d543ab commit 02934ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/file-header.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ module.exports = FileHeader =

addHeader: (editor, buffer, headerTemplate) ->
return unless newHeader = @getNewHeader editor, headerTemplate
newHeader = newHeader.replace(/(?:\r\n|\r|\n)/g, @getCurrentFileLineEnding(buffer))
newHeader += @getCurrentFileLineEnding(buffer).repeat(atom.config.get('file-header.numOfEmptyLinesAfterNewHeader', scope: (do editor.getRootScopeDescriptor)))
# remove leading empty lines
buffer.scan(/\s*(?:\r\n|\r|\n)(?=\S)/, (result) =>
Expand Down

0 comments on commit 02934ad

Please sign in to comment.