tldr-pages / tldr-lint

:rotating_light: A linting tool to validate tldr pages
https://www.npmjs.com/package/tldr-lint
MIT License
36 stars 20 forks source link

New linter error if, in the command example, there is a leading or trailing space #293

Closed vitorhcl closed 6 months ago

vitorhcl commented 9 months ago

To be clear, we could check if there is a space after the opening backtick or a space before the closing backtick. I don't think it has any effect on a command on any platform.

I fixed some of these pages on https://github.com/tldr-pages/tldr/pull/11850.

kbdharun commented 9 months ago

cc @sebastiaanspeck, what do you think?

sebastiaanspeck commented 9 months ago

Sounds like a good idea. I am too inexperienced with the tldr-lint to make any modifications, so this would need to be picked up by someone else.

gutjuri commented 6 months ago

Spaces after the opening tick are fine to forbid IMO. Spaces at the end of a command could be deliberate. E.g. echo \ can be used in common Linux shells to print a space character.