vmg / sundown

Standards compliant, fast, secure markdown processing library in C
2k stars 385 forks source link

Map Table Extension #34

Open trans opened 13 years ago

trans commented 13 years ago

One thing that Markdown lacks is an easy way to create definition lists. I would really like to see an extension for rdoc's style of definition lists. It uses double-colons to signify them. Here's is an example:

Coffee:: black hot drink
Milk:: white cold drink

Which would render to:

[NOTE this has changed. See below.]

<dl>
  <dt>Coffee</dt>
    <dd>black hot drink</dd>
  <dt>Milk</dt>
    <dd>white cold drink</dd>
</dl>
consiliens commented 13 years ago

See #10.

trans commented 13 years ago

On re-examination of this I have mistook what RDoc does with double colons. Rather the result of my example of using :: should be:

<table class="map-table">
  <tr>
    <th>Coffee</th>
    <td>black hot drink</td>
  </tr>
  <tr>
    <th>Milk</th>
    <td>white cold drink</td>
  </tr>
</table>

It's a two-column table for 1-to-1 lists. The class="map-table" allows it to be distinguished from other tables in css. The the name map-table is not special, I just made up off the top of my head. Pick whatever is more appropriate.