From a12d5ef9023f6f6589f3372d5bc8b16346305e11 Mon Sep 17 00:00:00 2001 From: Mohit Tokas Date: Wed, 13 Mar 2024 19:15:02 +0530 Subject: [PATCH] remove cols & rows from default textarea snippet (#727) --- src/snippets/html.json | 5 ++++- test/expand.ts | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/snippets/html.json b/src/snippets/html.json index b48bd6a3..16186adf 100644 --- a/src/snippets/html.json +++ b/src/snippets/html.json @@ -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]", diff --git a/test/expand.ts b/test/expand.ts index 4e918141..9b406006 100644 --- a/test/expand.ts +++ b/test/expand.ts @@ -16,6 +16,9 @@ describe('Expand Abbreviation', () => { 'output.field': (index, placeholder) => `\${${index}${placeholder ? ':' + placeholder : ''}}` } }), ''); + + // https://github.com/emmetio/emmet/issues/725 + equal(expand('textarea'), ''); }); it('attributes', () => { @@ -98,6 +101,12 @@ describe('Expand Abbreviation', () => { // https://github.com/emmetio/emmet/issues/468 equal(expand('repeat', { snippets }), '
\n\t\n
'); + + // https://github.com/emmetio/emmet/issues/725 + equal(expand('tarea'), ''); + equal(expand('tarea:c'), '') + equal(expand('tarea:r'), '') + equal(expand('tarea:cr'), '') }); it('formatter options', () => {