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

Strange behaviours of formatting for double spans #1113

Closed
chengtie opened this issue Jan 19, 2017 · 1 comment
Closed

Strange behaviours of formatting for double spans #1113

chengtie opened this issue Jan 19, 2017 · 1 comment

Comments

@chengtie
Copy link

chengtie commented Jan 19, 2017

OS Version: macOS Sierra 10.12.2

VScode (which uses js-beautify as the underlying formatter) Version:
screen shot 2017-01-19 at 12 04 28

The shortcut shift+alt+f is used to format the whole document (without having to select anything), and cmd+k cmd+f is used to format the selection.

{ "key": "shift+alt+f",           "command": "editor.action.formatDocument",
                                     "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly" },
{ "key": "cmd+k cmd+f",           "command": "editor.action.formatSelection",
                                     "when": "editorHasDocumentFormattingProvider && editorHasSelection && editorTextFocus && !editorReadonly" },

My experiments show that formatting html does not work well for the following case:

<span>
    <span>try</span>
    <div>posted by</div>
</span>

will be formatted to

<span>
    <span>try</span>
<div>posted by</div>
</span>

Does anyone know what's happening?

Cheers

@bitwiseman
Copy link
Member

Fixed in 1.8.0-rc6

@bitwiseman bitwiseman modified the milestones: v1.8.x, 1.8.0-rc7 Aug 14, 2018
@bitwiseman bitwiseman modified the milestones: 1.8.0-rc8, 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