~axvr/ascribe.vim unlisted

1a89621b37fb678b35472f35dd3fbd200825f689 — Alex Vear 5 months ago 269210b master
Allow Ascribe to detect empty attributes

Previously the following attribute would have been ignored by ascribe.

    *.txt       foo=

Now it will save the value of 'foo' as an empty string.
1 files changed, 2 insertions(+), 2 deletions(-)

M autoload/ascribe.vim
M autoload/ascribe.vim => autoload/ascribe.vim +2 -2
@@ 33,13 33,13 @@ function <SID>get_attributes(attrs, file)
    let l:item = 0

    for l:a in a:attrs
        let l:match = matchlist(l:result[l:item], '\m\C: \([0-9a-zA-Z_.-]\+\)$')
        let l:match = matchlist(l:result[l:item], '\m\C: \([0-9a-zA-Z_.-]*\)$')

        let l:item = l:item + 1

        let l:value = l:match[1]

        if len(l:value) == 0 || l:value ==# 'unspecified'
        if l:value ==# 'unspecified'
            continue
        elseif l:value ==# 'set'
            let l:value = 1