Skip to content

Conversation

@michalsnik
Copy link
Member

This PR ignores closeBracket option for closing tags. Fixes #728

@michalsnik michalsnik self-assigned this Jan 7, 2019
@michalsnik michalsnik requested a review from mysticatea January 7, 2019 14:47
{
filename: 'test.vue',
code: unIndent`
<template>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the source code where all lines are indented, You can be moved to fixtures.

Copy link
Member Author

@michalsnik michalsnik Jan 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these examples to fixtures. And turns out there is one more issue.

The following code is fine:

<!--{"options":[2, { "closeBracket": 1 }]}-->
<template>
  <a
    href="#"
    >Link 1</a
  >
</template>

But when there is any element below the link, like here:

<!--{"options":[2, { "closeBracket": 1 }]}-->
<template>
  <a
    href="#"
    >Link 1</a
  >
  <span>text</span>
</template>

it wants to additionally indent the close bracket of </a> like this:

<template>
  <a
    href="#"
    >Link 1</a
    >
  <span>text</span>
</template>

Do you have an idea what might be causing it @mysticatea ?

@mysticatea
Copy link
Member

Honestly, I think that closeBracket option should apply to all tags regardless of start tags or end tags.

@ota-meshi ota-meshi deleted the fix-html-indent-closeBracket branch May 30, 2020 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

closeBracket affects end tag

4 participants