DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
930 stars 170 forks source link

could you please add a feature to add the 2 space at the end of each line if not given by default. #331

Closed OAtulA closed 6 months ago

OAtulA commented 6 months ago

So when the line ends we need to add 2 spaces in the md format .
But it would save some time if the extension could do it for us when we hit enter.
After we save the file.

DavidAnson commented 6 months ago

Two spaces at the end of a line is known as a hard line break: https://spec.commonmark.org/0.31.2/#hard-line-breaks

This is not necessary, nor is it common in my experience. Are you suggesting otherwise?

OAtulA commented 6 months ago

Thanks for responding. But when I write normally without adding 2 spaces at the end.

In the rendered page. I don't get the line break. They all come in one line.

DavidAnson commented 6 months ago

Yes. You should probably read about how Markdown formatting works. Blank lines introduce paragraphs. This page explains more: https://daringfireball.net/projects/markdown/syntax#p

OAtulA commented 6 months ago

But the point is not about creating paragraphs. That's an easy thing to do. I know that.

But my ask is to have 2 spaces at end of each line. When we save files.

Just like when I code in vs code in js. It automatically adds the ; at the end of the line while I save. Maybe it's Prettier extension.

DavidAnson commented 6 months ago

Good point. I don't think that behavior is something that belongs in markdownlint, but you may find it in prettier or another tool.