Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Unindenting html tags #1294

Closed
caseycrites opened this issue Dec 11, 2013 · 1 comment
Closed

Unindenting html tags #1294

caseycrites opened this issue Dec 11, 2013 · 1 comment
Labels

Comments

@caseycrites
Copy link

Atom version

0.43.0

Behavior expected

Pressing return should have no affect on the indentation of a closing html tag that's already correctly indented.

Behavior observed

When closing an html tag on the line below the opening tag, it is automatically indented to match the opening tag like so:

screen shot 2013-12-11 at 3 25 53 pm

However, if you position the cursor before the closing tag and press return, the tag un-indents itself like so:

screen shot 2013-12-11 at 3 26 00 pm

and the process will repeat itself until the closing tag reaches the left-edge of the buffer:

screen shot 2013-12-11 at 3 26 05 pm

steffengy pushed a commit to steffengy/atom that referenced this issue May 11, 2014
If you press ENTER before a line, a new line is introduced by appending "\n" before it.
Therefor a previous line of "" is appended before the <TAG>-line.
This line remains unindented, causing a wrong indentation for the next line.
Basically this is fixed by indenting this line (oldBuffer.end.row = newBuffer.start.row).
steffengy pushed a commit to steffengy/atom that referenced this issue May 14, 2014
If you press ENTER before a line, a new line is introduced by appending "\n" before it.
Therefor a previous line of "" is appended before the <TAG>-line.
This line remains unindented, causing a wrong indentation for the next line.
Basically this is fixed by indenting this line (oldBuffer.end.row = newBuffer.start.row).
Also added a specification, which tests this by appending \n before a javascript closing bracket,
which would, just as a closing html tag, would cause a wrong indentation.
@izuzak izuzak added the bug label May 21, 2014
probablycorey pushed a commit that referenced this issue Jun 3, 2014
Fix indenting of HTML tags for instance. Fix #1294
avdg pushed a commit to avdg/atom that referenced this issue Jun 9, 2014
The indentation level is not anymore reduced by adding a new line,
which previously caused multiple reductions of the indentation level.
This fixes the behavior of HTML closing tags, which currently
"jump" backwards if you try to move them down.
@lock
Copy link

lock bot commented Jan 26, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Jan 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants