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

The result of "Format document" is weird of certain HTML content. #1223

Closed
aeschli opened this issue Aug 3, 2017 · 3 comments
Closed

The result of "Format document" is weird of certain HTML content. #1223

aeschli opened this issue Aug 3, 2017 · 3 comments

Comments

@aeschli
Copy link

aeschli commented Aug 3, 2017

From @slayerxj on July 28, 2017 7:28
Originally reported against VSCode (which uses jsbeautifier as formatter for HTML): microsoft/vscode#31628

Steps to Reproduce:

<!DOCTYPE html>
<html>

<head></head>

<body>
    <div>
        <div>
            <p>Reconstruct the schematic editor the EDA system <a href="http://www.jedat.co.jp/eng/products.html"><i>AlphaSX</i></a> series</p>
        </div>
    </div>
</body>

</html>
  • set 'Wrap lines near 120 characters'
  • format
  • the result is
...<p>EDA system <a href="http://www.jedat.co.jp"><i>Alpha-SX</i></a>                series</p>

Notice the unnecessary spaces added before 'series'

@bitwiseman
Copy link
Member

@aeschli -
Excellent bug report.
With the repro steps you provided, I can reproduce the issue.

I see your original comment said you have "editor.wordWrap": "off". But then your repro steps talk mention setting wrap to 120. To have wordWrap turned off you'd set the wrap value to 0. Then this problem does not occur.

@aeschli
Copy link
Author

aeschli commented Aug 4, 2017

@bitwiseman Sorry for the confusion. Ignore the "editor.wordWrap": "off" comment. That's a VSCode setting and is not related to html formatting. I'll update the description...

@ReubenAllott
Copy link

ReubenAllott commented Oct 1, 2017

I am seeing the same thing in VSCode 1.16.1, particularly after inline a and code tags.

I am using "&nbsp;" instead of spaces to prevent the unwanted white space appearing (the unwanted white space can cause problems in output).

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

3 participants