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

Formatting is ugly #39

Closed
shijunti19 opened this issue Feb 14, 2017 · 11 comments
Closed

Formatting is ugly #39

shijunti19 opened this issue Feb 14, 2017 · 11 comments
Labels

Comments

@shijunti19
Copy link

image

@octref
Copy link
Member

octref commented Feb 14, 2017

Dup of #38 and #20. Ok guess I'll work on embedded formatter first.

@octref octref closed this as completed Feb 14, 2017
@octref
Copy link
Member

octref commented Feb 15, 2017

@octref octref reopened this Feb 15, 2017
@octref
Copy link
Member

octref commented Feb 15, 2017

html formatting is working for me, with VSCode's stock html formatter.

format

@shijunti19
Copy link
Author

shijunti19 commented Feb 15, 2017

@octref
install vetur
Appears: Set the document format

image

<div class="weui_panel weui_panel_access">div class="weui_media_bd"><div class="weui_media_box weui_media_text new_padding"><h4 class="weui_media_title " v-html="item.title" style="margin-bottom:0;"></h4></div></div></div>

I tested this because of this:
<h4 class="weui_media_title " v-html="item.title" style="margin-bottom:0;"></h4>
it have style="margin-bottom:0;"

image

@octref
Copy link
Member

octref commented Feb 15, 2017

div class="weui_media_bd">

You have a div without tag, div class="weui_media_bd">.

@shijunti19
Copy link
Author

shijunti19 commented Feb 15, 2017

@octref
no
you try style="..."
image

@octref
Copy link
Member

octref commented Feb 15, 2017

Do you mind pasting the code?

@shijunti19
Copy link
Author

shijunti19 commented Feb 15, 2017

@octref

<template>
    <div class="weui_panel weui_panel_access">
        <div class="weui_media_bd">
            <div class="weui_media_box weui_media_text new_padding">
                <h4 class="weui_media_title " v-html="item.title" style="margin-bottom:0;"></h4>
</div>
</div>
</div>
</template>

@octref octref added the bug label Feb 15, 2017
@octref
Copy link
Member

octref commented Feb 15, 2017

Thanks, the stock html formats that code fine but vetur doesn't -- I'll look into it.

@faisalhakim47
Copy link

I think it is related to vscode bug. microsoft/vscode#17849
Has been fixed since 1.9

@octref
Copy link
Member

octref commented Feb 23, 2017

Thanks, that should be it. I'll port it over to the language server.

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

No branches or pull requests

3 participants