-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline matches with CR (^M) characters #423
Comments
Hello, thanks for reporting this! This is because the commit in question is not conventional and it is not filtered out. That is why To skip those commits: filter_unconventional = true Or if you only want the first line to appear in the changelog:
You can also use commit preprocessors/postprocessors to process the commit/changelog. When it comes to the actual question, I agree that we should normalize CR, LF into LF. That can be also done with pre-processors though. I'm not sure if |
Q: Is the regex |
It is matched for the first line since it is not configured as multi line. I also think that it should support multiline but I'm not sure how to achieve that with /// Regex for matching the commit message.
#[serde(with = "serde_regex", default)]
pub message: Option<Regex>, Feel free to open a tracking issue about this!
I hope this answers your question 🐻 |
Describe the bug
I think only the title of git commit messages should be considered, but when the commit contains mixed CR/LF for some reason, extraction of commit title would be broken, resulting into multi-line messages (with CR) printed in the release note.
To reproduce
c.toml:
Output:
A strange commit 72a6643b1380cdf6f1153d70eeaffb90bdca30d6 has a commit message where CR and LF is mixed.
Expected behavior
Only the first line is considered. Maybe we should normalize CR, LF into LF.
Screenshots / Logs
N/A
Software information
Additional context
This repro is a simplification of neovim/neovim#26818 where
git cliff --config scripts/cliff.toml v0.9.0..HEAD
produces some strange multi-line release note items.The text was updated successfully, but these errors were encountered: