Skip to content

Latest commit

 

History

History
168 lines (116 loc) · 3.27 KB

common-mark.md

File metadata and controls

168 lines (116 loc) · 3.27 KB

CommonMark sample document

Basic inline formatting

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et

Headers

Level 3

Level 4

Level 5
Level 6

Links

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat (http://www.example.com/autolink), sed diam voluptua.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Images

Pixel images as blocks:

The Rust logo

SVG images as blocks:

The Rust logo

Pixel images from remote locations:

The Rust logo

Lists

Unordered lists:

  • Lorem impsum
    • Nested
    • Inline
    • Text
  • dolor sit amet
    • Nested

    • With

      Paragraphs and nested blocks:

      A quote

      And some text at the end

  • consetetur sadipscing elitr

Ordered lists:

  1. Lorem impsum

    1. Nested
    2. Inline
    3. Text
  2. dolor sit amet

    1. Nested

    2. With

    Paragraphs and nested blocks:

    A quote

    And some text at the end

  3. consetetur sadipscing elitr

And a mix of both:

  • Lorem impsum
    1. Nested
    2. Inline
      • With
      • Some
      • Nested
      • Bullets
    3. Text
  • dolor sit amet

Task lists:

  • TODO
  • DONE

Block level elements

Block quotes

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

Before we continue, have a ruler:


Code blocks without syntax highlighting:

Some plain
code block
   fooo

Or with syntax highlighting, eg, Rust:

fn main() {
    println!("Hello world")
}

Or Haskell:

main :: IO ()
main = putStrLn "Hello World"

Or Scala:

object HelloWorld {
  def main(args: Array[String]): Unit = {
    println("Hello, world!")
  }
}

HTML

We can have block html:

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Or inline HTML, as in this paragraph: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.