markdown

How do I ensure that whitespace is preserved in Markdown?


Currently, I have this line in a Markdown file detailing command output:

1\. Work (00:10:00)  
    1\. Mail letter (00:05:00, Est. 00:03:00)  
      Send letter to Foo Bar  
2\. Personal (00:02:00)

However, when I preview the Markdown file, all of the whitespace is disregarded.

1. Work (00:10:00)
1. Mail letter (00:05:00, Est. 00:03:00)
Send letter to Foo Bar
2. Personal (00:02:00)

How do I preserve this whitespace?


Solution

  • Markdown is used primarily to generate HTML, and HTML collapses white spaces by default. Use   instead of space characters.