lobsters/lobsters

(some) Line endings visible in emails

Open

#1,075 opened on Mar 30, 2022

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Ruby (961 forks)user submission
buggood first issue

Repository metrics

Stars
 (4,680 stars)
PR merge metrics
 (Avg merge 7d 4h) (20 merged PRs in 30d)

Description

When receiving emails some line endings are visible and printed. I think that these are line endings encoded twice for some reason? The rest of the email contains correct line endings. I used Emacs M-x describe-char at each line ending, and the end of each line contains 0x0A which is RET LINE FEED.

This is not bound to any specific comment or story, it's everywhere. The comment below is linked here.

This is how it's presented in the MUA:

A really useful thing is to always display the error code unless it's 0.
Got used to it real quick and don't know how I lived without it.

prompt_show_ec () {^M
 # Catch exit code^M
 ec=$?^M
 # Display exit code in red text unless zero^M
 if [ $ec -ne 0 ];then^M
  echo -e "\033[31;1m[$ec]\033[0m"^M
 fi^M
}^M
PROMPT_COMMAND="prompt_show_ec; $PROMPT_COMMAND"^M

This is the raw email:

A really useful thing is to always display the error code unless it's 0.
Got used to it real quick and don't know how I lived without it.
prompt_show_ec () {=0D
 # Catch exit code=0D
 ec=3D$?=0D
 # Display exit code in red text unless zero=0D
 if [ $ec -ne 0 ];then=0D
  echo -e "\033[31;1m[$ec]\033[0m"=0D
 fi=0D
}=0D
PROMPT_COMMAND=3D"prompt_show_ec; $PROMPT_COMMAND"=0D

Contributor guide