Skip to content

Instantly share code, notes, and snippets.

@revin
Last active March 21, 2016 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save revin/802270e0a26ddbd24446 to your computer and use it in GitHub Desktop.
Save revin/802270e0a26ddbd24446 to your computer and use it in GitHub Desktop.
Markdown list nesting test

test A

  1. PouchDB: The PouchDB constructor.
  2. credentials: A valid hawk credentials object
{
  algorithm: 'sha256',
  id: 'abcdef',
  key: '1234567890'
}

See hawk's source code


test B

  • foo
  • bar
  • spam
  1. blargh
  2. blargh2
  3. blargh3

  1. blargh
  2. blargh2
  3. blargh3
  • foo
  • bar
  • spam

test C

  1. Test 1
  2. Unindented code block follows:
  {
    foo: 'bar'
  }
  1. Test 2
  2. Indented one space
  {
    foo: 'bar'
  }
  1. Test 3
  2. Indented two spaces
  {
    foo: 'bar'
  }
  1. Test 4

  2. Indented 3 spaces

      {
        foo: 'bar'
      }

test D

  • bullet list begin

    1. Test 1
    2. Unindented code block follows:
      {
        foo: 'bar'
      }
    1. Test 2
    2. Indented one space
      {
        foo: 'bar'
      }
    1. Test 3
    2. Indented two spaces
      {
        foo: 'bar'
      }
    1. Test 4

    2. Indented 3 spaces

        {
          foo: 'bar'
        }

So it looks like a single space indent puts the code block inside a list item, but the code itself is visually misaligned; anything more than one space properly nests.

===

test E

test 1

  • first
  • second
  • third
  • fourth

test 2

  1. first item

  2. second item

    • foo
    • bar
    • spam
  3. third item

    another paragraph at the same indent

  4. fourth item

  5. fifth item

    • foo
    • bar
    • spam
  6. sixth item


test 3

  • first item

  • second item

    1. foo
    2. bar
    3. spam

    another paragraph in the second item

  • third item

    another paragraph in the third item

  • fourth item

  • fifth item


test 4

  • first

  • second

  • third

    • nested 1

    • nested 2

      • nested 3
        • nested 3.1

        • nested 3.2

        • nested 3.3

        • nested 3.4

          • nested 3.4.1
          • nested 3.4.2
          • nested 3.4.3
  • third item

    another paragraph in the third item

  • fourth item

  • fifth item

foo

* this()
* is()
* code()

  • foo

    • this()
    • indented(2)
    • isNotCode()

  • foo

    * this()
    * indented(4)
    * isNotCode()
    

  • foo

      * this()
      * indented(6)
      * isCode()
    

test 5

  • first item

  • second item no indent

  • another item

  • additional item one space indent

  • continuing item

  • further item two space indent


test F

  • unchecked item 1
  • unchecked item 2
  • unchecked item 3
  • checked item 4

  • foo
    • nested unchecked item 1
    • nested unchecked item 2
    • nested checked item 3

  1. checked ordered 1
  2. unchecked ordered 2
  3. checked ordered 3
  4. unchecked ordered 4

  1. foo
    • nested unchecked item 1
    • not a todo item 2
    • not a todo item 3
    • nested checked item 4
  2. bar
  3. spam

  • unchecked todo item 1
  • [ ] not a todo item 2
  • [ x] not a todo item 3
  • [x ] not a todo item 4
  • [ x ] not a todo item 5
  • todo item 6

test G

test a

  • indent 0
  • indent 1
  • indent 1
    • indent 2
    • indent 3
    • indent 2
      • indent 4
      • indent 5
      • indent 4
        • indent 6
        • indent 7
        • indent 6

test b

  • indent 0
  • indent 1
  • indent 0
    • indent 3
    • indent 4
    • indent 3
      • indent 5
      • indent 6
      • indent 5
        • indent 7
        • indent 8
        • indent 7

test c

  • indent 0
  • indent 1
  • indent 0
    • indent 3
    • indent 4
    • indent 3
      • indent 6
      • indent 7
      • indent 6
        • indent 9
        • indent 10
        • indent 9

test d

  • indent 0
  • indent 1
  • indent 0
    • indent 4
    • indent 5
    • indent 4
      • indent 6
      • indent 7
      • indent 6
        • indent 8
        • indent 9
        • indent 8

test e

  • indent 0
  • indent 1
  • indent 0
    • indent 4
    • indent 6
    • indent 4
      • indent 7
      • indent 8
      • indent 7
        • indent 10
        • indent 11
        • indent 10

test f

  • indent 0
  • indent 1
  • indent 0
    • indent 4
    • indent 7
    • indent 4
      • indent 8
      • indent 9
      • indent 8
        • indent 12
        • indent 13
        • indent 12

test g

  • indent 0
  • indent 1
  • indent 0
    • indent 5 - indent 6
    • indent 5
      • indent 7
      • indent 8
      • indent 7
        • indent 9
        • indent 10
        • indent 9

test h

  • indent 0
  • indent 1
  • indent 0
    • indent 5 - indent 6
    • indent 5
      • indent 8
      • indent 9
      • indent 8
        • indent 11
        • indent 12
        • indent 11

test i

  • indent 0
  • indent 1
  • indent 0
    • indent 5 - indent 6
    • indent 5
      • indent 9
      • indent 10
      • indent 9
        • indent 13
        • indent 14
        • indent 13

test j

  • indent 0
  • indent 1
  • indent 0
    • indent 5 - indent 6
    • indent 5
      • indent 10 - indent 11
      • indent 10
        • indent 15 - indent 16
        • indent 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment