2

I'm using the vim-pandoc and vim-pandoc-syntax bundles in neovim. I'm converting the markdown to a docx file and I'm seeing that I need to do a double space in order to get a carriage return in the Word document.

What setting am I misconfiguring?

5

Markdown has a concept of a "paragraph" different from that of MS Word.

In MS Word, all text wrapping is "soft wrapped"—that is, you keep typing text without pressing "Enter" (or "Return") until you have finished an entire paragraph.

In Markdown, you can do that, but more often markdown source will be "hard wrapped"—in other words, while typing a paragraph you will press "Return" whenever convenient to keep individual lines of text from becoming too long (much as you would on an old-fashioned typewriter).

So a Markdown paragraph consists of multiple consecutive lines of text. To start a new paragraph, the usual action is to insert a blank line (i.e. press return twice when you finish a paragraph). However, you can also put a double space at the end of a line, as you discovered.

The blank line for separation has the advantage of being easy to recognize visually whereas a double space at the end of a line is generally invisible when viewing the Markdown source.

0

Got it...Markdown requires a double space at the end of a line to denote a carriage return.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.