Normalize `line_comments` strings to have a trailing space (#51033)
Justin Su
created
I did a search for `/^line_comments = .*[^\s\[]"/` to identify these 3
languages:
- Git Commit
- Go Mod
- Go Work
that don't add/remove a trailing space for inline comments. I couldn't
find any indication that the absence of the trailing space is due to any
peculiarity of these languages.
---
For Git Commit, I should note that (strictly speaking) the comment
character is a single `#` without a trailing space, as Git removes any
line starting with the default comment character (`#`) (see
https://git-scm.com/docs/git-config#Documentation/git-config.txt-corecommentChar).
But I believe this change only affects whether `editor::ToggleComments`
adds/removes the space, and not how the file is syntax highlighted. So
for aesthetics and consistency, it should be better to add/remove the
trailing space.
---
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Add/remove a space when toggling inline comments in Git Commit and Go
Mod/Work languages