spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
391 stars 41 forks source link

Fix regex for parsing section labels in commit messages #3

Closed sven-of-cord closed 2 years ago

sven-of-cord commented 2 years ago

There was a bad error in the regex for identifying labels (e.g. "Test Plan:") in the commit message. It looked for alphanumeric/space characters followed by a colon, but didn't look only at the beginnings of lines. So a line having "Summary:" somewhere in the middle (like this one) was treated like the "Summary:" label.

Test amended to catch this.

Test Plan: spr format on this commit, cargo test