Markdown/Commonmarker examples

Updated . Posted . Visible to the public.

This card shows you how to format a card's content using Markdown Show archive.org snapshot . We use the Commonmarker Show archive.org snapshot interpreter, so here are examples for its dialect.

Formatting

**Bold**

Bold

_Italics_

Italics

`Monospaced`

Monospaced

> Quoted text

Quoted text

Here is [a link](http://makandra.com/).

Here is a link.

![An image; this is the alt text](http://www.makandra.com/assets/logo/makandra-logo-home.png)

An image; this is the alt text

Line breaks

A line break in the code
results in a line break.
    
Add a new line for a paragraph.

A line break in the code
results in a line break.

Add a new line for a paragraph.

Headlines

Underline headlines with an equals sign or dash -- or start a line with a hash symbol:

Hello World
-----------
Lorem ipsum...

Hello Universe
==============
Lorem ipsum...

# Hello Alice
Lorem ipsum...

Hello World

Lorem ipsum...

Hello Universe

Lorem ipsum...

Hello Alice

Lorem ipsum...

Horizontal rules

Just draw a line with dashes. Make sure to have a blank line above it so it's not interpreted as a headline.

Here is some text.

------------------------

Text below the horizontal rule.

Here is some text.


Text below the horizontal rule.

Code

Indent text by 4 spaces. This way it is recognized as code.

    def foo
      "hello!"
    end
def foo
  "hello!"
end

You can also create code blocks GitHub-style:

```
def foo
  "hello!"
end
```
def foo
  "hello!"
end

Lists

* Bullet list item 1
* Bullet list item 2
  • Bullet list item 1
  • Bullet list item 2

You can also use + or - instead of *.

1. Numbered list item
2. Numbered list item
42. You don't need to number properly
  1. Numbered list item
  2. Numbered list item
  3. You don't need to number properly

(Mind 42 not being used; counting happens automatically)

Combining

You can of course combine this. It becomes a bit tricky when you're using lists, but it's not that hard. Just make sure you indent properly (2 spaces for bullet/definition lists, 3 spaces for numbered lists [since you have number + dot + space]).

* This is a list
  * Sub item 1
  * Sub item 2

* Next list item. We can also nest code:

      def foo
        "hello!"
      end

  ... and continue writing. This still is part of the list item.

  • This is a list

    • Sub item 1
    • Sub item 2
  • Next list item. We can also nest code:

    def foo
      "hello!"
    end
    

    ... and continue writing. This still is part of the list item.

Arne Hartherz
Last edit
Niklas Hasselmeyer
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2012-02-28 17:23)