Visitar URL original
Unstable result, indentation changes on every run · Issue #18158 · prettier/prettier · GitHub
Skip to content

Unstable result, indentation changes on every run #18158

Closed

Description

@MaxWinterstein

Prettier 3.6.2
Playground link

--parser markdown
--tab-width 4

Input:

- Foo
  <!-- prettier-ignore -->
                                                    {{ image("../media/foo.png", "Foo") }}

Output:

- Foo
    <!-- prettier-ignore -->
                                                      {{ image("../media/foo.png", "Foo") }}

Expected output:

something stable that does not change on each run

Why?

REAMDE.md is a minimalized example of some mkdocs-based documentation. I would be fine with the code not being pretty, but at least it should be the same every run.

The playground above is not accurate; an unstable result can be produced locally like this:

README.md

- Foo
  <!-- prettier-ignore -->
                                                    {{ image("../media/foo.png", "Foo") }}

.prettierrc.yml

overrides:
  - files: "README.md"
    options:
      tabWidth: 4
      useTabs: false

Running with 3.6.2:

Image

Activity

  1. changed the title [-]Unstable result, indention changes on every run[/-] [+]Unstable result, indentation changes on every run[/+] on Oct 30, 2025
  2. added theissue type on Oct 30, 2025
  3. sorafujitani commented on Dec 17, 2025

    @sorafujitani
    Contributor

    Fix this issue

  4. MaxWinterstein commented on Sep 14, 2026

    @MaxWinterstein
    Author

    Fixed on main, probably by these two PRs.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions