Clean up HTML snippets that add extraneous tags

This commit is contained in:
Alvin Chan 2016-07-19 16:54:17 -07:00
parent c74d97c650
commit fb4e3f0986

View File

@ -127,7 +127,6 @@ endsnippet
############# #############
snippet input "Input with Label" w snippet input "Input with Label" w
<label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="$5"${6: id="${7:$2}"}`!p x(snip)`> <label for="${2:${1/[[:alpha:]]+|( )/(?1:_:\L$0)/g}}">$1</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="$5"${6: id="${7:$2}"}`!p x(snip)`>
endsnippet endsnippet
snippet input "XHTML <input>" w snippet input "XHTML <input>" w
@ -141,9 +140,7 @@ endsnippet
snippet select "Select Box" w snippet select "Select Box" w
<select name="${1:some_name}" id="${2:$1}"${3:${4: multiple}${5: onchange="${6:}"}${7: size="${8:1}"}}> <select name="${1:some_name}" id="${2:$1}"${3:${4: multiple}${5: onchange="${6:}"}${7: size="${8:1}"}}>
<option${9: value="${10:option1}"}>${11:$10}</option> ${0:${VISUAL}}
<option${12: value="${13:option2}"}>${14:$13}</option>${15:}
$0
</select> </select>
endsnippet endsnippet
@ -189,8 +186,6 @@ snippet form "XHTML <form>" w
snip.rv = (snip.basename or 'unnamed') + '_submit' snip.rv = (snip.basename or 'unnamed') + '_submit'
`}" method="${2:get}" accept-charset="utf-8"> `}" method="${2:get}" accept-charset="utf-8">
${0:${VISUAL}} ${0:${VISUAL}}
<p><input type="submit" value="Continue →"`!p x(snip)`></p>
</form> </form>
endsnippet endsnippet
@ -252,8 +247,7 @@ endsnippet
snippet table "XHTML <table>" w snippet table "XHTML <table>" w
<table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}> <table border="${1:0}"${2: cellspacing="${3:5}" cellpadding="${4:5}"}>
<tr><th>${5:Header}</th></tr> ${0:${VISUAL}}
<tr><td>${0:Data}</td></tr>
</table> </table>
endsnippet endsnippet
@ -271,7 +265,7 @@ endsnippet
snippet ul "unordered list" w snippet ul "unordered list" w
<ul> <ul>
${0:${VISUAL}} ${0:${VISUAL}}
</ul> </ul>
endsnippet endsnippet