Skip to content

Commit

Permalink
remove cols & rows from default textarea snippet (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
theperfectpunk authored Mar 13, 2024
1 parent 24d4d98 commit a12d5ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/snippets/html.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@
"select": "select[name=${1} id=${1}]",
"select:d|select:disabled": "select[disabled.]",
"opt|option": "option[value]",
"textarea": "textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]",
"textarea": "textarea[name=${1} id=${1}]",
"tarea:c|textarea:cols":"textarea[name=${1} id=${1} cols=${2:30}]",
"tarea:r|textarea:rows":"textarea[name=${1} id=${1} rows=${3:10}]",
"tarea:cr|textarea:cols:rows":"textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]",
"marquee": "marquee[behavior direction]",
"menu:c|menu:context": "menu[type=context]",
"menu:t|menu:toolbar": "menu[type=toolbar]",
Expand Down
9 changes: 9 additions & 0 deletions test/expand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ describe('Expand Abbreviation', () => {
'output.field': (index, placeholder) => `\${${index}${placeholder ? ':' + placeholder : ''}}`
}
}), '<ul>\n\t<li class="item1">${1}</li>\n\t<li class="item2">${2}</li>\n</ul>');

// https://github.com/emmetio/emmet/issues/725
equal(expand('textarea'), '<textarea name="" id=""></textarea>');
});

it('attributes', () => {
Expand Down Expand Up @@ -98,6 +101,12 @@ describe('Expand Abbreviation', () => {

// https://github.com/emmetio/emmet/issues/468
equal(expand('repeat', { snippets }), '<div>\n\t<ul>\n\t\t<li>Hello World</li>\n\t\t<li>Hello World</li>\n\t\t<li>Hello World</li>\n\t</ul>\n</div>');

// https://github.com/emmetio/emmet/issues/725
equal(expand('tarea'), '<textarea name="" id=""></textarea>');
equal(expand('tarea:c'), '<textarea name="" id="" cols="30"></textarea>')
equal(expand('tarea:r'), '<textarea name="" id="" rows="10"></textarea>')
equal(expand('tarea:cr'), '<textarea name="" id="" cols="30" rows="10"></textarea>')
});

it('formatter options', () => {
Expand Down

0 comments on commit a12d5ef

Please sign in to comment.