Remove all old credit lines in the output then add a new one (#526)
* Fixes #507 - Removes old credit lines in log so that there are no duplicates * Added missing newline at end of file * Replaced single-quoted empty string with double quotes
This commit is contained in:
commit
b94fb7f839
|
@ -21,8 +21,10 @@ module GitHubChangelogGenerator
|
|||
|
||||
log += File.read(options[:base]) if File.file?(options[:base])
|
||||
|
||||
credit_line = "\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*"
|
||||
log += "\n\n#{credit_line}" unless log.include?(credit_line)
|
||||
credit_line = "\n\n\\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*"
|
||||
log.gsub!(credit_line, "") # Remove old credit lines
|
||||
log += credit_line
|
||||
|
||||
@log = log
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user