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

force-expand-multiline doesn't work as expected #1186

Closed
octref opened this issue May 8, 2017 · 17 comments
Closed

force-expand-multiline doesn't work as expected #1186

octref opened this issue May 8, 2017 · 17 comments

Comments

@octref
Copy link

octref commented May 8, 2017

Description

force-expand-multiline doesn't work as expected.

Input

The code looked like this before beautification:

<template>
  <div
    class="test"
    @click="test"
  >
    <input
      ref="test"
      v-if="test"
    >
      <div>
        <span>test</span>
      </div>
      </div>
</template>

Expected Output

The code should have looked like this after beautification:

<template>
  <div
    class="test"
    @click="test"
  >
    <input
      ref="test"
      v-if="test"
    >
    <div>
      <span>test</span>
    </div>
  </div>
</template>

Actual Output

The code actually looked like this after beautification:

> html-beautify --version
1.6.12
> html-beautify -f test.html -A "force-expand-multiline"
<template>
  <div
    class="test"
    @click="test"
  >
    <input
      ref="test"
      v-if="test"
    >
      <div>
        <span>test</span>
      </div>
      </div>
</template>%

Steps to Reproduce

Environment

OS: macOS 10.12.4

Settings

> html-beautify -f test.html -A "force-expand-multiline"

Related vuejs/vetur#99

@HADB
Copy link

HADB commented May 8, 2017

+1

@bitwiseman
Copy link
Member

@octref - your input is missing a closing /:

 <input
      ref="test"
      v-if="test"
    >

I assume that is just a typo during bug filing.

@octref
Copy link
Author

octref commented May 9, 2017

I thought for self closing tags / is optional.
But even if I add / this still happens.

@bitwiseman
Copy link
Member

@octref
You're probably right. I don't know off the top of my head. I mention it only because the input text was different from output (in a non-formatting way).

@octref
Copy link
Author

octref commented May 9, 2017

@bitwiseman Right, I fixed that. Sorry for the confusion.

@msmolcic
Copy link

What's the status on this one? I'd really love to see this fixed.

@bitwiseman
Copy link
Member

@msmolcic - This issue is unassigned. It needs someone to take the time to implement a fix and tests.

@GearoidCollins
Copy link

People still getting this issue?
I seem to be getting it with "html.format.wrapAttributes": "force-expand-multiline" on [email protected]

@diabloevagto
Copy link

@GearoidCollins
it still not working on [email protected]

@luzanovdm
Copy link

it still not working on [email protected] too

@bitwiseman
Copy link
Member

@Predve4niy
This issue is unassigned. It needs someone to take the time to implement a fix and tests.

@JakubKubista
Copy link

"vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
        "wrap_attributes": "force-expand-multiline",
    },
}

Still doesn't work as expected.

@affanshahid
Copy link

+1

1 similar comment
@EzioW
Copy link

EzioW commented Jun 25, 2018

+1

@EzioW
Copy link

EzioW commented Jun 25, 2018

@bitwiseman have you fixed it ?

@bitwiseman
Copy link
Member

@EzioW
This issue is unassigned. It needs someone to take the time to implement a fix and tests.

@bitwiseman
Copy link
Member

fixed in 1.7.6

@bitwiseman bitwiseman added this to the v1.7.6 milestone 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

10 participants