This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Unindenting html tags #1294
Labels
Comments
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.
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.
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! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:
However, if you position the cursor before the closing tag and press return, the tag un-indents itself like so:
and the process will repeat itself until the closing tag reaches the left-edge of the buffer:
The text was updated successfully, but these errors were encountered: