tldr-lint icon indicating copy to clipboard operation
tldr-lint copied to clipboard

Replace/Deprecate TLDR008

Open SethFalco opened this issue 4 years ago • 3 comments

Markdown files depend on trailing whitespace to add a line break without creating a new paragraph.

image

Due to our .editorconfig and TLDR008, we don't have 2 spaces between the description and more information link. This makes websites and other Markdown renderers render them on the same line.

For example, this issue occurs when viewing files on GitHub and on tldr.ostera.io.

I think TLDR008 should be replaced with a similar rule that disallows trailing whitespace on all lines except the page description. Following this, our .editorconfig should include the rule:

[*.{markdown,md}]
trim_trailing_whitespace = false

Actual

image

Expected

image

SethFalco avatar Jul 29 '21 02:07 SethFalco

An alternate solution could be the following:

It introduces an alternative syntax for hard line breaks, a backslash at the end of the line, supplementing the two-spaces-at-the-end-of-line rule. This is motivated by persistent complaints about the “invisible” nature of the two-space rule. - https://github.com/commonmark/commonmark-spec#differences-from-original-markdown

So to leave this rule intact, but require a \ at the end of the line before the more info line.

SethFalco avatar Aug 04 '21 14:08 SethFalco

I'm not a fan of how that would look, but two spaces after each line isn't really better. Also, it would be annoying if we would have to make sure every contributer follows this syntax. I assume we also can't automatically add them, since that would prabably create issues for contributors when pushing new changes without pulling.

marchersimon avatar Aug 05 '21 12:08 marchersimon

Reopening this as it's still an issue as long as declare we use Markdown files.

SethFalco avatar May 07 '23 00:05 SethFalco