plugin-pug icon indicating copy to clipboard operation
plugin-pug copied to clipboard

Bug: adds unwanted space if pugSingleFileComponentIndentation is true

Open Ralac07 opened this issue 10 months ago • 1 comments

Plugin Version

v3.2.1

Prettier Version

v3.4.2

Which frameworks are affected?

  • [ ] none
  • [x] vue
  • [ ] angular
  • [ ] svelte

Node Version

v23.5.0

Which operating systems have you used?

  • [ ] Linux
  • [ ] macOS
  • [x] Windows

Prettier config

{
  "plugins": ["@prettier/plugin-pug"],
  "pugSingleFileComponentIndentation": true
}

Input

<template lang="pug">
ul
  each val in [1, 2, 3, 4, 5]
    li= val
</template>

Output or Error

<template lang="pug">
  ul
    each val in [1, 2, 3, 4, 5]
      li  = val
</template>

Expected Output

<template lang="pug">
  ul
    each val in [1, 2, 3, 4, 5]
      li= val
</template>

Additional Context

No response

Ralac07 avatar Feb 08 '25 03:02 Ralac07

@Ralac07 I will now also notify you here, please have a look into the PR and tell me if this is sufficient or if I need to add more.

Shinigami92 avatar Feb 17 '25 10:02 Shinigami92