Open AmirHosseinKarimi opened 6 months ago
I'm not able to reproduce this -
mkdir example
cd example
touch readme.md
git add readme.md
git commit -m "feat: example <with tag>"
npx commit-and-tag-version
generates a changelog with:
## 1.1.0 (2024-01-15)
### Features
* example <with tag> dfa9580
As an aside, I think having markdown syntax in commit messages is actually helpful - as it lets you format code (useful for the tag syntax):
# note the single quotes
git commit -m 'feat: example `<with tag>`'
Yea, the generated changelog is correct. But the <
& >
characters will be parsed and won't shown in the output.
Also, I agree that having markdown syntax in the commit message is helpful, But I think it will be awesome if we can have an option to parse or escape it.
Ah, I see what you're getting at.
...characters will be parsed
Am I right in understanding that the issue is that they're parsed by markdown, because they weren't escaped at the time the markdown file is written?
I think escaping the characters that markdown interprets would be a bit unexpected, so this doesn't feel like a bug to me. But, I see how it might be useful to be able to do this with a config option.
This project is intended to be a wrapper around conventional-changelog. Conventional-changelog controls the writing of the changelog, and I think the package that knows how to write markdown is conventional-changelog-writer (although I'm not certain). You might want to open an issue / PR over there.
Describe the bug Characters like < and > are parsed as markdown syntax and won't shown in output. Something like
feat: add <Header> to <App>
will shown as:feat: add to
Current behavior Characters like < and > are parsed as markdown syntax.
Expected behavior Escape markdown syntax from commit messages.
Environment
commit-and-tag-version
version(s): 12.1.0