Changeset f6295f4c7c61385226e21286d79867b630ff494c


Ignore:
Timestamp:
26.07.2013 01:48:45 (8 years ago)
Author:
Stanislaw Klekot <dozzie@…>
Branches:
b66903eafbcb1d49112014abc82c8bf683413db0
Children:
2cb0baeb2bf7d0789b0d3cb6b9828c51b0c054c9
Parents:
0528d7a6149dc3fdd32ddb34744a51adb1ef6e8b
git-author:
Stanislaw Klekot <dozzie@…> (26.07.2013 01:48:45)
git-committer:
Stanislaw Klekot <dozzie@…> (26.07.2013 01:48:45)
Message:

Unified list item nodes across lists (tree cleanup).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dashwiki/markup/_tree_utils.py

    r0528d7 rf6295f  
    2121  if name in ['LIST_NUMERIC', 'LIST_BULLET', 'LIST_ALPHA']: 
    2222    return '' 
     23 
     24  if name in ['bullet_list_element', 
     25              'alpha_list_element', 
     26              'numbered_list_element']: 
     27    tree['list_item'] = tree[name] 
     28    del tree[name] 
     29    name = 'list_item' 
     30    if 'space' in value[-1]: 
     31      value.pop() 
    2332 
    2433  # delimiters (LINE_BREAK, EMPTY_LINE) should never occur here 
     
    8695    # chomp elements 0 and -1 
    8796    value = tree[name] = value[1:-1] 
    88  
    89   # TODO: add chomping the last space from nodes 
    90   # {bullet,alpha,numbered}_list_element (there's always one from NL 
    91   # character) 
    9297 
    9398  if name == 'link': 
Note: See TracChangeset for help on using the changeset viewer.