mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-06 10:44:24 +08:00
Fixes errors on lint. #236
This commit is contained in:
@@ -8,7 +8,6 @@ function! emmet#lang#css#parseIntoTree(abbr, type)
|
||||
let prefix = 0
|
||||
let value = ''
|
||||
|
||||
let settings = emmet#getSettings()
|
||||
let indent = emmet#getIndentation(type)
|
||||
let aliases = emmet#getResource(type, 'aliases', {})
|
||||
let snippets = emmet#getResource(type, 'snippets', {})
|
||||
|
||||
@@ -18,8 +18,6 @@ function! emmet#lang#haml#toString(settings, current, type, inline, filters, ite
|
||||
let attribute_style = emmet#getResource('haml', 'attribute_style', 'hash')
|
||||
let str = ""
|
||||
|
||||
let comment_indent = ''
|
||||
let comment = ''
|
||||
let current_name = current.name
|
||||
if dollar_expr
|
||||
let current_name = substitute(current.name, '\$$', itemno+1, '')
|
||||
@@ -165,8 +163,8 @@ function! emmet#lang#haml#parseTag(tag)
|
||||
let current = emmet#newNode()
|
||||
let mx = '%\([a-zA-Z][a-zA-Z0-9]*\)\s*\%({\(.*\)}\)'
|
||||
let match = matchstr(a:tag, mx)
|
||||
let current.name = substitute(match, mx, '\1', 'i')
|
||||
let attrs = substitute(match, mx, '\2', 'i')
|
||||
let current.name = substitute(match, mx, '\1', '')
|
||||
let attrs = substitute(match, mx, '\2', '')
|
||||
let mx = '\([a-zA-Z0-9]\+\)\s*=>\s*\%(\([^"'' \t]\+\)\|"\([^"]\{-}\)"\|''\([^'']\{-}\)''\)'
|
||||
while len(attrs) > 0
|
||||
let match = matchstr(attrs, mx)
|
||||
|
||||
@@ -402,7 +402,8 @@ function! emmet#lang#html#toString(settings, current, type, inline, filters, ite
|
||||
return text
|
||||
endif
|
||||
if len(current_name) > 0
|
||||
let str .= '<' . current_name
|
||||
let str .= '<' . current_name
|
||||
endif
|
||||
for attr in emmet#util#unique(current.attrs_order + keys(current.attr))
|
||||
if !has_key(current.attr, attr)
|
||||
continue
|
||||
|
||||
@@ -7,7 +7,6 @@ function! emmet#lang#slim#parseIntoTree(abbr, type)
|
||||
endfunction
|
||||
|
||||
function! emmet#lang#slim#toString(settings, current, type, inline, filters, itemno, indent)
|
||||
let settings = a:settings
|
||||
let current = a:current
|
||||
let type = a:type
|
||||
let inline = a:inline
|
||||
@@ -17,8 +16,6 @@ function! emmet#lang#slim#toString(settings, current, type, inline, filters, ite
|
||||
let dollar_expr = emmet#getResource(type, 'dollar_expr', 1)
|
||||
let str = ""
|
||||
|
||||
let comment_indent = ''
|
||||
let comment = ''
|
||||
let current_name = current.name
|
||||
if dollar_expr
|
||||
let current_name = substitute(current.name, '\$$', itemno+1, '')
|
||||
@@ -124,8 +121,8 @@ function! emmet#lang#slim#parseTag(tag)
|
||||
let current = emmet#newNode()
|
||||
let mx = '\([a-zA-Z][a-zA-Z0-9]*\)\s\+\(.*\)'
|
||||
let match = matchstr(a:tag, mx)
|
||||
let current.name = substitute(match, mx, '\1', 'i')
|
||||
let attrs = substitute(match, mx, '\2', 'i')
|
||||
let current.name = substitute(match, mx, '\1', '')
|
||||
let attrs = substitute(match, mx, '\2', '')
|
||||
let mx = '\([a-zA-Z0-9]\+\)=\%(\([^"'' \t]\+\)\|"\([^"]\{-}\)"\|''\([^'']\{-}\)''\)'
|
||||
while len(attrs) > 0
|
||||
let match = matchstr(attrs, mx)
|
||||
|
||||
@@ -283,7 +283,6 @@ function! emmet#util#getImageSize(fn)
|
||||
endfunction
|
||||
|
||||
function! emmet#util#imageSizeWithImageMagick(fn)
|
||||
let fn = a:fn
|
||||
let img_info = system('identify -format "%wx%h" "'.a:fn.'"')
|
||||
let img_size = split(substitute(img_info, '\n', '', ''), 'x')
|
||||
if len(img_size) != 2
|
||||
|
||||
Reference in New Issue
Block a user