Fix this indentation inference bug
Open
Nobody has claimed this yet.
area:prettier-plugin
Bug
Severity: 3
- Dominant language
- TypeScript
- Stars
- 234
- Forks
- 92
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
Describe the bug
Indentation inference bug
Unformatted source
<details
class="group/level-2"
x-trap="getIsMobileNavItemActive('{{ link_forloop.index }}-{{ link_link_forloop.index }}')"
@header-mobile-nav-items-active-change.window="
() => mobileNavItemsActiveChangeEvent($event, '{{ link_forloop.index }}-{{ link_link_forloop.index }}')
"
>
</details>
Expected output
<details
class="group/level-2"
x-trap="getIsMobileNavItemActive('{{ link_forloop.index }}-{{ link_link_forloop.index }}')"
@header-mobile-nav-items-active-change.window="
() => mobileNavItemsActiveChangeEvent($event, '{{ link_forloop.index }}-{{ link_link_forloop.index }}')
"
>
</details>
Actual output
<details
class="group/level-2"
x-trap="getIsMobileNavItemActive('{{ link_forloop.index }}-{{ link_link_forloop.index }}')"
@header-mobile-nav-items-active-change.window="
() => mobileNavItemsActiveChangeEvent($event, '{{ link_forloop.index }}-{{ link_link_forloop.index }}')
"
></details>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides Liquid input, expected output, and actual output, but names no file, test, or entry point. Start by tracing the formatter's indentation-inference path for this case, then add a regression test for the expected output and confirm the extra indentation is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100