feat: support a verbose heading for the changelog #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the reason I stumbled upon #79.
I tend to use headings similar to the following for my
CHANGELOG.md
files:# ramsey/devtools Changelog
When I ran
keep-a-changelog bump
against an existing (created before installing phly/keep-a-changelog)CHANGELOG.md
, I got the following error (after applying the patch from PR #79):This error occurs because the regular expression in
ChangelogBump::updateChangelog()
expects a strict heading of:# Changelog
Since Keep A Changelog is not an exact specification (it's a convention), I would like to relax the strictness here. I still think the word "changelog" should be in the heading, so this new regular expression enforces this, but it allows for content to come before and after the word "changelog," and it allows "changelog" to be case-insensitive.