GitHub adds \r when applying code suggestions
#199141
Replies: 3 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
“Fun” fact: We learned the hard way today that this is not merely cosmetic. This can break Bash scripts. 😅 This runs fine: if [[ … ]]
then
:
fiBut then if I write: if [[ … ]]__HERE__
then
:
fi… and use this to get a sed 's/__HERE__/\r/'… the script (despite not looking much different than usual to the unwary eye) suddenly yields: sh2.sh: line 1: conditional binary operator expected
'h2.sh: line 1: syntax error near `]]
'h2.sh: line 1: `if [[ … ]]Please fix this. 🥲 |
|
Quick update:
FYI I’m on Xubuntu and using the “old” diff view ( |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
Body
Every now and then, when I apply suggestions from PR review, github inserts carriage return characters at line ends. This makes the suggestion feature useless and annoying to deal with. Is there any way this can be fixed or worked around?
All reactions