Code line wrapping should be toggleable, and maybe off by default #1305

Open
opened 2023-09-28 10:42:44 +00:00 by Letheward · 2 comments

For code and markdown code blocks, line wrapping should be toggleable, and maybe off by default, for these reasons:

  1. Line-wrapped code looks ugly and unreadable, especially on mobile. This is of course subjective, but as most text editors support toggling wrapping, it's reasonable to provide this option. Also, seems like the wrapping are not by word?

  2. Some people may use plain text to display tables (in code or README), and with line wrapping the formatting is destroyed.

  3. Most other source code hosting site don't wrap code. This does not automatically make the behavior correct, but even just for familiarity, I think it's better to leave it off by default.

For code and markdown code blocks, line wrapping should be toggleable, and maybe off by default, for these reasons: 1. Line-wrapped code looks ugly and unreadable, especially on mobile. This is of course subjective, but as most text editors support toggling wrapping, it's reasonable to provide this option. Also, seems like the wrapping are not by word? 2. Some people may use plain text to display tables (in code or README), and with line wrapping the formatting is destroyed. 3. Most other source code hosting site don't wrap code. This does not automatically make the behavior correct, but even just for familiarity, I think it's better to leave it off by default.

I would love Markdown table codes unwrapped. +1

I would love Markdown **table** codes unwrapped. +1
n0toose added the
s/Gitea/Forgejo
label 2023-10-03 08:32:49 +00:00

We can likely add a toggle button for this to gitea, but it has to be a server-stored per-user setting.

We can likely add a toggle button for this to gitea, but it has to be a server-stored per-user setting.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Codeberg/Community#1305
There is no content yet.