phly / keep-a-changelog

Tools for manipulating CHANGELOG.md files in Keep A Changelog format, including tagging and releasing.
https://phly.github.io/keep-a-changelog/
BSD 2-Clause "Simplified" License
181 stars 21 forks source link

Backticked content is not added to CHANGELOG.md #49

Closed michalbundyra closed 5 years ago

michalbundyra commented 5 years ago

I run the command:

$ keep-a-changelog entry:fixed --pr=5 "`MyNamespace\MyClass` - fixes something"

and the entry in the changelog was as follows:

### Fixed

- [#5](https://github.com/webimpress/my-package/pull/5)  - fixes something

so the whole backticked content is gone somewhere and there are two spaces now.

michalbundyra commented 5 years ago

I've just noted that if I do:

$ keep-a-changelog entry:fixed --pr=5 "\`MyNamespace\MyClass\` - fixes something"

it works correctly.

So maybe the issue is system dependent? Anyway, I would expect that everything between quotes is inserted as-is into CHANGELOG file.

weierophinney commented 5 years ago

This is totally dependent on your shell. Many shells interpret backticks within double quotes the same way PHP does, and spawn a system call with the contents (equivalent to keep-a-changelog entry:fixed --pr=5 "$(MyNamespace\MyClass) - fixes something"). If you use single quotes, you'll likely see this go away (I tend to use single quotes when writing my entries, and do not hit the problem — at least, not in zsh).