8

I am new to Markdown and stuck. As of now, I am learning to be honest with Markdown itself using the Jekryllrb platform - I use the same for my blog via Octopress; however, I am finding it difficult to add a line break after a nested sublist (unordered) to it's superlist (ordered). Here is the sample:

1. [Lucideus Tech](http://www.lucideus.com) - 2011 - 2012 (1 Year)
    - Security Analyst
    - R&D @Lucideus Labs
    - Web Application Penetration Tester  
2. [CTG Security Solutions](http://www.ctgsecuritysolutions.com) - 2012 (8 Months)
    - Trainer Scheduler
    - Web Application Security Trainer  
3. Defencely Cloud Security Pvt. Ltd. - 2013 to Present (2015)
    - Red Team Lead
    - Web Application Security Specialist
    - Technical Specialist and SPOC @Application Security  

How do I add a line break after each of the ending sublists to keep them all neat, since if not, it all looks out of context and ridicules the styling?

Shritam Bhowmick
  • 227
  • 1
  • 2
  • 8
  • 1
    Can you add a screenshot to explain your question? Do you want vertical whitespace between, for example, "Web Application Penetration Tester" and "CTG Security Solutions"? – Chris Jun 25 '15 at 01:43
  • Yes, a vertical one on those you have mentioned ( a new paragraph). Here's the current setting of how it looks like. I would also like a solution for a new line feed, which is a new line and not an entire new paragraph (
    – Shritam Bhowmick Jun 25 '15 at 07:12

1 Answers1

13

Adding <br> tags in Markdown is somewhat unintuitive because of the way it handles paragraphs. From Paragraphs and Line Breaks on the syntax page:

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

This answers your second question.

The first is a bit trickier, and it relates back to Markdown's design goals, as explained in the Inline HTML section of that same document:

Markdown’s syntax is intended for one purpose: to be used as a format for writing for the web.

Markdown is not a replacement for HTML, or even close to it … The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format.

Adding space between those list items is a styling question, not a semantic one. Markdown doesn't say anything about styling; it is entirely focused on writing, and therefore on semantics.

I believe that the best way to add your vertical space is to do it by applying CSS on the HTML output from Markdown, for example by styling <ul> tags contained in <li> tags, e.g.

li > ul {
  padding-bottom: 0.5em;
}
Community
  • 1
  • 1
Chris
  • 93,263
  • 50
  • 204
  • 189
  • This answers the question which means by default, there is no way I could add a space between the needed new line
  • elements after having finished with
      elements which are part of the sublists of it's superlist (the superlist itself being the
    • ). I was wondering to style the padding, I should change the octopress sass folder and the folders thereneath?
  • – Shritam Bhowmick Jun 25 '15 at 12:23
  • @ShritamBhowmick, I don't believe that there's a way to add space between these list items in Markdown. CSS is an appropriate tool (probably the best one) to use when styling HTML. Does this answer your question? – Chris Jun 25 '15 at 12:34
  • yes, it does. I was curious if I could alter some files at /sass/ directories on octopress installations to make this one work out. – Shritam Bhowmick Jun 25 '15 at 17:55
  • @ShritamBhowmick, I'm not familiar with Octopress, but I imagine that its SASS files get compiled into CSS so you should be able to do that. I'm glad to hear that this answered your question. Please remember to [accept it](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) so other users know you found a solution. – Chris Jun 25 '15 at 18:28