mersenneforum.org  

Go Back   mersenneforum.org > Other Stuff > Forum Feedback

Reply
 
Thread Tools
Old 2022-10-27, 16:43   #1
SethTro
 
SethTro's Avatar
 
"Seth"
Apr 2019

32·53 Posts
Default newlines in linux

I don't know if this affects others


Everytime I add a newline on this forum it gets expanded to two newlines


I assume this is to do with "\n" vs "\n\r".



My "fix" is to preview the post, remove the extra newlines and then submit the post and god help me if I make an edits when previewing the post.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2022-10-27 09-43-07.png
Views:	35
Size:	133.3 KB
ID:	27526  
SethTro is offline   Reply With Quote
Old 2022-10-27, 17:07   #2
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

32×7×83 Posts
Default

Yes, this annoys me with all my posts as well. There is another more bothersome problem having to do with edited code blocks. extraneous characters show up at the beginning of a code line. This plays havoc with some languages such as Python. I have to watch carefully what happens if I edit a code block using the forum editor. I often do all code block editing via copy/paste to my local editor and copy/paste back into the forum code block.
EdH is offline   Reply With Quote
Old 2022-10-27, 17:47   #3
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

1CC616 Posts
Default

Also anomalous vspace behavior observed on Windows. Using Firefox. Beginning with a certain Firefox version; before that it was not an issue. At first I thought it was something had changed on the forum, but eventually traced it to Firefox behavior changing.
Preview early and often before posting original or edits, as a workaround. Or try a different browser.
One enter key-press preceded this line.


Two preceded this line. It initially looks right, then upon preview it's effectively three, as shown.
So if two are sought, enter enter preview delete-one.


Code blocks seems to "swallow" trailing vspace and convert them into leading spaces on the last line of the code block. Again, edit, preview, repeat until satisfied. On large reference posts it can be quite tedious.
Code:
/my code block
 /of 2 lines
followed by 2 enter key-presses. / should be beginning of line.
These can be hard to see in preview when the preview font is not fixed width. As can column alignment, which in my experience requires iterating.

Another nuisance is code blocks often have an extraneous trailing vspace or multiple that can not be eliminated. Example above has the ending code tag immediately following "lines", and "followed" immediately following the ]

Last fiddled with by kriesel on 2022-10-27 at 18:11
kriesel is online now   Reply With Quote
Old 2022-10-27, 18:09   #4
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

2·29·127 Posts
Default MS Edge Windows experiment

First line followed by two enter keypresses

Okay, now a code block
Code:
line1
line2
followed by text without any enter keypresses or vspace, then a second code block
Code:
line3
line4
followed by 2 enter keypresses, then this line.
Attached Thumbnails
Click image for larger version

Name:	ms edge compose.png
Views:	35
Size:	58.2 KB
ID:	27527  
kriesel is online now   Reply With Quote
Old 2022-10-28, 14:42   #5
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

621610 Posts
Default

My limited understanding is, it depends on what happens when you press Return. Two of the old ASCII control characters are CR ("Carriage Return", ASCII character code D hex or 13 decimal) and LF ("Line Feed", ASCII character code A hex or 10 decimal). I'm not sure how many other Forumites have seen a teletype machine in operation...

IIRC, MS-DOS "saw" pressing Return as CR-LF, while UNIX saw it as LF, AKA "newline." Apparently some "Unixalike" OS's "see" Return as CR instead.

Also from "back in the old days," I seem to recall something unexpected happening when UNIX "saw" a line in a text file which had only a single period typed on it. It might have treated it as end-of-file, but I don't remember for sure.
Dr Sardonicus is online now   Reply With Quote
Old 2022-10-28, 15:56   #6
Xyzzy
 
Xyzzy's Avatar
 
Aug 2002

2·7·13·47 Posts
Default

The weird extra CR/LF isn't an issue using Safari on IOS, so we think the problem might be browser-induced.

Xyzzy is offline   Reply With Quote
Old 2022-10-28, 16:10   #7
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

1CC616 Posts
Default

@SethTro, EdH: what browsers are you using? Have you tried an alternative and seen the same behavior, or different?
kriesel is online now   Reply With Quote
Old 2022-10-28, 16:45   #8
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

2D8616 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
My limited understanding is, it depends on what happens when you press Return. Two of the old ASCII control characters are CR ("Carriage Return", ASCII character code D hex or 13 decimal) and LF ("Line Feed", ASCII character code A hex or 10 decimal). I'm not sure how many other Forumites have seen a teletype machine in operation...

IIRC, MS-DOS "saw" pressing Return as CR-LF, while UNIX saw it as LF, AKA "newline." Apparently some "Unixalike" OS's "see" Return as CR instead.

Also from "back in the old days," I seem to recall something unexpected happening when UNIX "saw" a line in a text file which had only a single period typed on it. It might have treated it as end-of-file, but I don't remember for sure.


I've used honest-to-$DEITY teletypes many times. I would love to have an ASR-33 in my collection of memorabilia. A wet-sump printer.

A single dot on a line signalled the end of an email message and the like, such as a Usenet posting. It may well have had other uses.
xilman is offline   Reply With Quote
Old 2022-10-28, 18:02   #9
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

32·7·83 Posts
Default

Yes, I'm guilty of using Firefox and have not tried anything else. I have wandered through the settings a little bit to see if there may have been an editing value somewhere.
EdH is offline   Reply With Quote
Old 2022-10-28, 18:07   #10
storm5510
Random Account
 
storm5510's Avatar
 
Aug 2009
Not U. + S.A.

7·192 Posts
Default

I have had double spacing for years. I believe it to be a browser issue, mostly. It will do this with Firefox and MS Edge. The extra blank lines get added in while doing a preview.
storm5510 is offline   Reply With Quote
Old 2022-10-28, 19:30   #11
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

2×5,827 Posts
Default

Quote:
Originally Posted by storm5510 View Post
I have had double spacing for years. I believe it to be a browser issue, mostly. It will do this with Firefox and MS Edge. The extra blank lines get added in while doing a preview.
All versions of Firefux that I have used over the years, including this one, have had no such problem.

Perhaps Firefux works better under Linux?
xilman is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Subsystem for Linux v2 gets real Linux kernel tServo Software 0 2019-05-07 16:59
64-bit CD or DVD Linux henryzz Linux 15 2008-06-29 12:30
Serious help needed with Linux... gd_barnes No Prime Left Behind 6 2008-05-10 06:28
going from linux to windows nbv4 Software 1 2006-04-04 02:04
Linux Drooling_Sheep Software 8 2003-11-22 05:50

All times are UTC. The time now is 15:50.


Tue Jan 31 15:50:03 UTC 2023 up 166 days, 13:18, 0 users, load averages: 1.53, 1.16, 1.16

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

โ‰  ยฑ โˆ“ รท ร— ยท โˆ’ โˆš โ€ฐ โŠ— โŠ• โŠ– โŠ˜ โŠ™ โ‰ค โ‰ฅ โ‰ฆ โ‰ง โ‰จ โ‰ฉ โ‰บ โ‰ป โ‰ผ โ‰ฝ โŠ โŠ โŠ‘ โŠ’ ยฒ ยณ ยฐ
โˆ  โˆŸ ยฐ โ‰… ~ โ€– โŸ‚ โซ›
โ‰ก โ‰œ โ‰ˆ โˆ โˆž โ‰ช โ‰ซ โŒŠโŒ‹ โŒˆโŒ‰ โˆ˜ โˆ โˆ โˆ‘ โˆง โˆจ โˆฉ โˆช โจ€ โŠ• โŠ— ๐–• ๐–– ๐–— โŠฒ โŠณ
โˆ… โˆ– โˆ โ†ฆ โ†ฃ โˆฉ โˆช โŠ† โŠ‚ โŠ„ โŠŠ โŠ‡ โŠƒ โŠ… โŠ‹ โŠ– โˆˆ โˆ‰ โˆ‹ โˆŒ โ„• โ„ค โ„š โ„ โ„‚ โ„ต โ„ถ โ„ท โ„ธ ๐“Ÿ
ยฌ โˆจ โˆง โŠ• โ†’ โ† โ‡’ โ‡ โ‡” โˆ€ โˆƒ โˆ„ โˆด โˆต โŠค โŠฅ โŠข โŠจ โซค โŠฃ โ€ฆ โ‹ฏ โ‹ฎ โ‹ฐ โ‹ฑ
โˆซ โˆฌ โˆญ โˆฎ โˆฏ โˆฐ โˆ‡ โˆ† ฮด โˆ‚ โ„ฑ โ„’ โ„“
๐›ข๐›ผ ๐›ฃ๐›ฝ ๐›ค๐›พ ๐›ฅ๐›ฟ ๐›ฆ๐œ€๐œ– ๐›ง๐œ ๐›จ๐œ‚ ๐›ฉ๐œƒ๐œ— ๐›ช๐œ„ ๐›ซ๐œ… ๐›ฌ๐œ† ๐›ญ๐œ‡ ๐›ฎ๐œˆ ๐›ฏ๐œ‰ ๐›ฐ๐œŠ ๐›ฑ๐œ‹ ๐›ฒ๐œŒ ๐›ด๐œŽ๐œ ๐›ต๐œ ๐›ถ๐œ ๐›ท๐œ™๐œ‘ ๐›ธ๐œ’ ๐›น๐œ“ ๐›บ๐œ”