Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML: indentation fails after 2nd consecutive layer of tags #1326

Closed
jasjuang opened this issue Jan 16, 2018 · 1 comment
Closed

HTML: indentation fails after 2nd consecutive layer of tags #1326

jasjuang opened this issue Jan 16, 2018 · 1 comment

Comments

@jasjuang
Copy link

Input

The code looked like this before beautification:

<A>
    <IMG>/home/ubuntu/A.jpg</IMG>
</A>
<B>
<IMG>/home/ubuntu/B.jpg</IMG>
</B>

Expected Output

The code should have looked like this after beautification:

<A>
    <IMG>/home/ubuntu/A.jpg</IMG>
</A>
<B>
    <IMG>/home/ubuntu/B.jpg</IMG>
</B>

Actual Output

The code actually looked like this after beautification:

<A>
    <IMG>/home/ubuntu/A.jpg</IMG>
</A>
<B>
<IMG>/home/ubuntu/B.jpg</IMG>
</B>

Nothing changes. However, if I alter the <IMG> tag inside of <A> it always snaps back to the correct indentation.

Steps to Reproduce

copy paste the above code and see the result in http://jsbeautifier.org/

Settings

default setup in http://jsbeautifier.org/

@bitwiseman
Copy link
Member

@jasjuang Thanks for filing an issue.

In the above example the B is an "unformatted" tag. What you are seeing is a bug, but is already heavily reported. See #840, #841, and the issues linked from them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants