organic/notes/plain_list_ownership_notes.org

3.8 KiB

Test 1

Source

  1. foo

     1. bar

     2. baz

  2. lorem

  ipsum

Ownership

This table is just showing ownership for the plain list items, not the containing plain list nor the elements inside each item.

Plain List Item Owns trailing blank lines
foo (includes bar baz) Yes
bar Yes
baz Yes
lorem No

Analysis

This seems to imply that plain list items own their trailing blank lines except for the final plain list item in the top-most plain list which does not own its trailing blank lines.

Test 2

Source

  1. foo

     bar

     1. baz

        lorem

     ipsum


  dolar

Ownership

This table is just showing ownership for the plain list items, not the containing plain list nor the elements inside each item.

Plain List Item Owns trailing blank lines
foo -> ipsum (inclusive) No
baz lorem No

Analysis

This shows that the final plain list item in a nested plain list (baz lorem) does not own its trailing blank lines which conflicts with "baz" from Test 1.

Test 3

Source

  1. foo

     1. bar

        baz

  2. lorem

  ipsum

Ownership

Plain List Item Owns trailing blank lines
foo (includes bar baz) Yes
bar baz Yes
lorem No

Analysis

This was to test if having an extra paragraph in the final list item in the nested list changes the behavior. The behavior is consistent with Test 1, so the extra paragraph is not the cause of the discrepancy.

Test 4

Source

  1. foo

     1. bar

     2. baz

     candy

  2. lorem

  ipsum

Ownership

Plain List Item Owns trailing blank lines
foo (includes bar baz and candy) Yes
bar Yes
baz No
lorem No

Analysis

This was to test if putting a non-plain-list element at the end of foo changes the ownership of blank lines. baz changed to no longer owning its trailing whitespace.

This seems to imply that list items own their trailing whitespace except for the final item unless that list item is at the end of a list item.

Test 5

Source

  1. foo

     1. bar

     2. baz

     candy

  2. lorem

     1. cat

     2. dog

  ipsum

Ownership

Plain List Item Owns trailing blank lines
foo (includes bar baz and candy) Yes
bar Yes
baz No
lorem (includes cat and dog) No
cat Yes
dog No

Analysis

This breaks the theory that the final list item nested at the end of a list item gets to own its trailing blank lines since dog does not own its blank lines despite Test 1's baz owning its blank lines.

New Theory: final list items only own their blank lines if they are nested at the end of a non-final list item.