I just wrote this question and was wondering if there's a MarkdownSharp syntax for specifying a definition list -- it would have made specifying those function arguments a bit more natural...
If there's not, no big deal :)
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.
Sign up to join this communityI just wrote this question and was wondering if there's a MarkdownSharp syntax for specifying a definition list -- it would have made specifying those function arguments a bit more natural...
If there's not, no big deal :)
Yes, with <dl> and <dd>
definition lists.
The tags can be used since it is allowed to use HTML in Markdown.
<dl>
<dt><strong>Lower cost</strong></dt>
<dd>The new version of this product costs significantly less than the previous one!</dd>
<dt><strong>Easier to use</strong></dt>
<dd>We've changed the product so that it's much easier to use!</dd>
<dt><strong>Safe for kids</strong></dt>
<dd>You can leave your kids alone in a room with this product and they
won't get hurt (not a guarantee).</dd>
</dl>
<table>.
Mar 6, 2013 at 22:56
Maruku and kramdown support this.
kramdown
: A Markdown-superset converter
It looks like it doesn’t work on Stack Overflow though.
pandoc, too -- johnmacfarlane.net/pandoc/demo/example9/…
Nov 22, 2012 at 9:54
Markdown doesn't support description lists, however you can mimic this feature by placing two spaces at the end of a line to insert a line break, and then have to start description on the very next line
For example
1. Ist Item
First item with having index value 1
1. 2nd Item
Second item having index value 2, beside we gave it 1, which indicates that markdown parser does not break the list.
1. **3rd Item:**
If you want to do something fancy with your list
The above code will produce following results
<ol> container with <li> items where the first line and the next are separated with a <br> caused by the double space. So although not what the OP asks for, still a good workaround.
This is not the answer, but if you found this question, like me, while trying to solve the problem with GitHub flavored Markdown then you may find this of some use...
For GitHub Markdown you can use a series of blockquotes and paragraphs like this:
> Item 1
Describe Item 1
> Item 2
Describe Item 2
How this looks depends on the theme your pages use. For example:
Item 1
Describe Item 1
Item 2
Describe Item 2
As Elin commented below, this does not work for accessibility (screen readers) or semantically.
<dl> and <dd> tag which is what the OP is really asking for.
<dl>in a meta post and was surprised when it didn't work.