mrhanlon / less-than-slash

Atom.io package for closing open tags when `</` is typed, like in Sublime Text 3.
MIT License
23 stars 6 forks source link

Closing the tag no longer indents back #54

Closed LuisRodriguezLD closed 6 years ago

LuisRodriguezLD commented 6 years ago

Whenever I closed a tag the line would auto indent back, not sure if this is an Atom thing o a less-than-slash thing.

This is how it used to be: Seen in example gif as well.

<h1>
    <p>
        <a>
        </a>

This is what it does now:

<h1>
    <p>
        <a>
            </a>
urbanjaklin commented 6 years ago

I'm having the same issue.. not sure what caused the sudden change, but mine also started having this odd behavior a day or two ago. It also no longer moves the cursor to the beginning of the closing tag! I'm using Atom v1.23.1

MarcPorciuncula commented 6 years ago

Hi, I'm able to reproduce the indenting bug and am investigating, but @urbanjaklin the return cursor option still seems to be working for me, you've got it enabled and you're not in suggest mode right?

MarcPorciuncula commented 6 years ago

Opened a PR for a fix to this issue, still not sure about why the return cursor option wasn't working for you @urbanjaklin but the new code should be more consistent about dealing with that option, hopefully fixes the issue for you 😃

urbanjaklin commented 6 years ago

Hey @MarcoThePoro thanks for the fix! I'll have to wait to check on it once I'm back at work, as it's the only machine I use atom on. It may be the setting/option, as you've mentioned!

LuisRodriguezLD commented 6 years ago

thank you very much @MarcoThePoro !!

MarcPorciuncula commented 6 years ago

Appears to be working as of 0.18.0 🎉 (Note that auto outdent won't work in grammars that don't have it enabled, plain text won't auto outdent, I've tested html and babel es6 javascript and they seem to be working)