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 beautifying not working #1498

Closed
5 tasks done
nivv opened this issue Feb 2, 2017 · 5 comments
Closed
5 tasks done

HTML beautifying not working #1498

nivv opened this issue Feb 2, 2017 · 5 comments

Comments

@nivv
Copy link

nivv commented Feb 2, 2017

Description

The results of beautification are not what I expect.

Input Before Beautification

This is what the code looked like before:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <ul><li><a href="#">X</a></li></ul>
</body>

</html>

Expected Output

The beautified code should have looked like this:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <ul>
        <li><a href="#">X</a></li>
    </ul>
</body>

</html>

Actual Output

The beautified code actually looked like this:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible"
            content="ie=edge">
            <title>Document</title>
</head>

<body>
    <ul>
        <li><a href="#">X</a></li>
    </ul>
</body>

</html>

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Note: It doesn't matter if wrap_attributes is set to force or auto

Debug

Here is a link to the debug.md Gist: https://gist.github.com/nivv/737386623d093b42df615da6ad401037

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@nivv
Copy link
Author

nivv commented Feb 2, 2017

Seems related to beautifier/js-beautify#1103. Maybe we can close this one

@prettydiff
Copy link
Collaborator

Agreed, closing.

@djettasin
Copy link

This has been resolved by the 3rd party. Any chance of publishing with correct reference to js-beautify?

@nivv
Copy link
Author

nivv commented Mar 23, 2017

Can we get this updated as @larsandreasness says? Seems silly to not have the latest fixes from js- beautify

Edit: I reinstalled the package and that seems to fix it.

@Glavin001
Copy link
Owner

Reinstalling atom-beautify triggers a fresh install of all of the dependencies, and is the recommended solution 👍 .

Feel free to submit a Pull Request to update the version numbers in the package.json, however it would be a tedious process to try and stay up to date and publish a new release for every single dependency in the package.json 😉 .

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

4 participants