The `cz ch` command generates a `CHANGELOG.md` that includes the content from the body.
Description
When I use the cz ch command, I only want it to capture the title part and not read or parse the body part.
Currently, I guess that this piece of code is parsing the body.
I'm not sure if my input and output situation matches your expected output. However, I hope it doesn't parse the content of the body. If this result is what you originally expected, I would like to add a flag to stop parsing the body.
Steps to reproduce
My commit message:
Current behavior
Desired behavior
Screenshots
No response
Environment
cz-version==3.29.1 python-version==3.12.7 operating system==window10
Whether to include the content from the body is something we probably could make it configurable. But will probably need to check whether it makes sense to other cz rules. If not, how we can make it happen.
Also, the example you provide doesn't look right 🤔 It should be
### refactor
* 12
fix: ...
feat:
It's at least a bug we would like it to be fixed.
I'm not sure which incorrect example you're talking about, the current output or the expected output?
The current logic always splits the body section with \n\n, then uses strings starting with keywords like feat, fix, refactor, perf, or BREAKING CHANGE as part of the changelog.
Here are more current output examples.
Body "feat" is connected to the previous line "Hello World!" and they are treated as one string, failing the regex check and being ignored.
The two paragraphs are separate. "Hello World" fails the regex check and won't be displayed, but "feat" will appear in the changelog.
There is no body section, but the title has two lines that are ultimately connected into a single string. However, when the body section has multiple lines, the line breaks are preserved, and they are not connected into one string.