Skip to content

[2.10.0] Outputs spaces instead of tabs #947

Description

@boris-petrov

Prettier-Java 2.10.0

--print-width 100
--use-tabs

Playground link

Input:

public A aaaa() {
  if (true) {
    return a
      ? a
      : bbbbbbbbbbbbbbbbbbbbbbbbbbbbb ||
        bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
        ? a
        : null;
  }
}

Output:

public A aaaa() {
	if (true) {
		return a
			? a
			: bbbbbbbbbbbbbbbbbbbbbbbbbbbbb ||
				  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
				? a
				: null;
	}
}

Note the spaces just before the long "bbb" line. That should be a tab instead.

Expected behavior:
Same but with tabs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions