vscode-markdown-shortcuts icon indicating copy to clipboard operation
vscode-markdown-shortcuts copied to clipboard

Add support for toggleLineBreaks (2 spaces at the end of each line)

Open ghuser opened this issue 5 years ago • 3 comments

This is a very common case. After pasting a paragraph, In order for the lines to be retained, 2 spaces need to be added at the end of each line. It would be nice to support this.

ghuser avatar Nov 05 '19 14:11 ghuser

Hi @ghuser, can you please explain a bit more? Could you give some sample input and output? Thanks!

mdickin avatar Nov 10 '19 15:11 mdickin

See: https://daringfireball.net/projects/markdown/syntax#p

"When you do want to insert a
break tag using Markdown, you end a line with two or more spaces, then type return."

input (the input below is rendered as a b c in one line):

a
b
c

command:toggleLineBreaks

output (2 spaces at the end of each line):

a  
b  
c  

Then it is rendered as 3 separate lines.

The opposite should also work. E.g. remove the spaces from the end of each line.

ghuser avatar Nov 11 '19 10:11 ghuser

Ahh, thanks for the clarification. I wasn't aware of this.

mdickin avatar Nov 11 '19 14:11 mdickin