atom/autocomplete-html

Autocomplete leaves a bracket at the start

Closed this issue · 1 comments

Prerequisites

Description

When typing HTML and using auto-completed it leaves an extra bracket "<" at the start of the tag. This happens when starting a new document and when using tags such as "

".

Steps to Reproduce

  1. Open a new html file
  2. Begin by typing "<htm" and press tab to auto-complete the template
  3. The template will fill in but start with "<"

Other reproduction steps

  1. Open any html file
  2. Begin typing "<div" and hit tab to auto-complete
  3. The div will complete with the closing tag and class but start with "<<div" rather than "<div" like it should.

Expected behavior: All tags start with single bracket "<" after auto-complete

Actual behavior: All auto-completed tags start with 2 brackets "<<"

Reproduces how often: Every time.

Versions

Atom : 1.37.0
Electron: 2.0.18
Chrome : 61.0.3163.100
Node : 8.9.3
Running on Apple OS 10.14.5

Additional Information

Nothing more to add.

rsese commented

Thanks for the report - a GIF/screencast would confirm but I'm guessing that you're selecting the snippet suggestion rather than the autocomplete suggestion? Do you see 2 html options like this?

html-completion

The first one is the html snippet (the green icon for it is missing in 1.37.0) which will just insert the snippet and that already includes the opening bracket while the autocomplete-html suggestion (has the red icon) will suggest as you type e.g.:

html-autocomplete

So if you want the snippet, you should just type html without the opening bracket. And the same for div.

If I'm misunderstanding, please let me know and share a GIF/screencast so we can take a look.