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 text content formatted incorrectly #1184

Closed
methyl opened this issue Apr 19, 2017 · 1 comment
Closed

HTML text content formatted incorrectly #1184

methyl opened this issue Apr 19, 2017 · 1 comment

Comments

@methyl
Copy link

methyl commented Apr 19, 2017

Description

Text content in HTML is not formatted correctly. The end tag should be prepended with a new line.

Input

The code looked like this before beautification:

<div><div></div>Connect</div>

Expected Output

The code should have looked like this after beautification:

<div>
  <div></div>Connect
</div>

or

<div>
  <div></div>
  Connect
</div>

Actual Output

The code actually looked like this after beautification:

<div>
    <div></div>Connect</div>

Steps to Reproduce

Go to http://jsbeautifier.org/, paste the code, format.

Environment

http://jsbeautifier.org/

Settings

Default online settings.

@bitwiseman
Copy link
Member

bitwiseman commented Apr 26, 2017

Yeah, div behaves like p in the output. The beautifier should handle it correctly. Related to some degree to #841 maybe?

@bitwiseman bitwiseman added this to the v1.7.6 milestone Jun 30, 2018
bitwiseman added a commit to bitwiseman/js-beautify that referenced this issue Jun 30, 2018
@bitwiseman bitwiseman modified the milestones: v1.8.0-rc2, 1.8.0 Aug 22, 2018
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