dandavison / magit-delta

Use delta (https://github.com/dandavison/delta) when viewing diffs in Magit
MIT License
285 stars 10 forks source link

Escape meta character #11

Closed syohex closed 3 years ago

dandavison commented 3 years ago

Hi @syohex, thanks for this. Can you explain the bug that you are fixing and give an example of how to reproduce it?

syohex commented 3 years ago

This is not a bug. Both non-escape + and escape \\+ are matched against + character in this case. However I suppose escaping meta character in regular expression is a good practice and easy to understand code.

dandavison commented 3 years ago

OK thanks for the suggestion. I won't merge this as a pull request because I don't want to mess up your contribution history with little code-review changes like this, but I may make the change.

By the way, please do add descriptions to PRs -- I don't think it's ever correct to open a PR in a public project with no explanation of the change.