lib/changelog/parsers/keep_a_changelog.rb in danger-changelog-0.6.0 vs lib/changelog/parsers/keep_a_changelog.rb in danger-changelog-0.6.1
- old
+ new
@@ -14,11 +14,11 @@
blocks = blocks[1..-1]
else
notify_of_global_failure(
'The changelog is missing the version header for the Keep A ' \
'Changelog format. See <https://keepachangelog.com> to see ' \
- 'the format of the header'
+ 'the format of the header.'
)
end
blocks.each do |header, *body|
notify_of_bad_line(header) unless ChangelogHeaderLine.new(header).valid?
@@ -40,10 +40,10 @@
block = []
lines.each do |line|
line = line.chomp
- if /##?[^#]/.match?(line)
+ if /^##?[^#]/.match?(line)
blocks << block.dup unless block.empty?
block.clear
end
block << line unless line.empty?