atom-react icon indicating copy to clipboard operation
atom-react copied to clipboard

Autocomplete as self closing tags when necessary

Open sergionsz opened this issue 9 years ago • 2 comments

Right now, all tags are closed by autocompletion with closing tags: `

This is fine with almost all HTML tags, but not with several of them (eg. img). React components should also be self closed: <Component /> `

sergionsz avatar Aug 24 '16 21:08 sergionsz

I know closing tags are valid in JSX and React, however, it'd be nice if, at least, tags that start with upper case get self closed.

I'll try to look at the code and see if I can change it and send a PR.

sergionsz avatar Aug 24 '16 21:08 sergionsz

Any and all tags specifically written as self closing should not add additional closing tag unless specifically whitelisted as needing a full closing tag. The list of tags that cannot be self-closed is very small, while the potential list of self-closable tags is basically endless (as emphasized by JSX).

skylize avatar Mar 14 '17 06:03 skylize