-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap at column 80, mostly. #25
base: main
Are you sure you want to change the base?
Conversation
A few exceptions were manually wrapped or unwrapped so hyperlinks display correctly in markdown color coding in VS Code.
Why? Hard wrapping makes editing much harder, and viewing diffs much more turbulent - soft wrapping is a far better experience imo. |
It seems common practice for markdown & text files in open source to be hard wrapped because it's convenient in many code editors, which tend to word-wrap based on window size, not line length by default. This is especially true for people running large screens. Some industry examples: https://raw.githubusercontent.com/github/MVG/main/LICENSE For example, in a default vs-code installation, running VSCode full-screen, enabling and disabling word-wrap won't wrap the files in this repo except to the window width, not a logical line length. It is probably possible to configure VS code to do so, either with non-default settings, or extensions, but that's extra setup to make it easy to work with this repo. |
What's wrong with using the window width? |
Accessibility matters and it is well established that readability declines when line width gets far above 80. |
Also consider this markdown style guide: https://google.github.io/styleguide/docguide/style.html#character-line-limit |
Can you cite some sources? I'm aware that's been a convention for awhile, because monitors used to be that small, but I'm not aware of actual studies that support it. Either way, markdown on Github is not viewed on a single size screen, and hard wrapped lines are objectively LESS accessible and readable when the screen size is smaller than 80 chars, as it often is on phones. |
you mean besides the Google style guide I posted earlier? Here are some more sources:
MarkdownLint has 80 characters are a default line length for advising they are too long: John Gruber (the originator of Markdown) suggests "it looks better this way": Wikipedia observes that Markdown was created to be "appealing to human readers in its source code form".
True, but three points:
I've offered the PR and pointed to a number of style guides and reasoning for the suggestion. You have objected and pointed to "imo" and "phone screens on GitHub". You have a fundamental right to disagree and like what you like and if the numerous examples I've cited don't convince you, then I feel this is in danger of becoming a bit of an irreconcilable debate - like spaces vs. tabs. I'm content to let the maintainers of this repo decide what happens here. Anyone creating a repo based on these documents are obviously free to choose what works for them irrespective of either decision here. I don't expect such projects to frequently (if ever) take integrations from these documents on an ongoing basis once their separate organization & project repos are up and running, at least not as direct PRs from here. |
I don't mean style guides (which are opinions), I mean actual sources (scientific studies) for "it is well established that readability declines when line width gets far above 80". |
Typography and layout is not my primary area of expertise, but I can certainly say from my personal experience that this is true and I have read many articles on the topic that state the same conclusion over the years. https://baymard.com/blog/line-length-readability The reason is, that for most readers, eye tracking on wider lines is more difficult, slowing down reading and comprehension. Maybe that's not your personal experience, but at this point I'd say the burden of proof that longer lines are better (or at least not worse), falls squarely on your side of the debate. |
Thanks. This is a strong argument for the rendering being at that width, but not for the source material, since in an editor it's trivial to soft-wrap at whatever width you want. The diff churn hard-wrapping creates imo far outweighs any benefits to keeping it hard-wrapped in the repo. |
The whole idea of markdown is to look good as source code. (see my quotes above). Your opinion runs contrary to both the stated intentions and commentary of the Markdown creator himself as well as the standard text format for open source license agreements that have been used in open source in text format for decades. You are entitled to your opinion, but I have answered your questions. At this point, let me ask you... Is there any possible argument that would satisfy you @ljharb ? |
I suppose if my decades of experience with hard wrapping being worse were countered by a similar amount of experience with it being better, that’d do it, but likely not in this conversation. |
@bradlitterell have you considered reference style links for this PR? Examples in the Gist here: https://gist.github.com/emedinaa/28ed71b450243aba48accd634679f805 I am a hard-wrapper (not involved with this project in any way other than following it) but it feels more organic when combined with reference style linking. The numbered or labelled approach seems fine. |
@ross-spencer - I like the suggestion, but would rather submit it as a separate PR assuming this one is eventually approved/merged. I will adopt your suggestion for another MVG-based project I am creating. Thanks! |
A few exceptions were manually wrapped or unwrapped so hyperlinks display correctly in markdown color coding in VS Code.