Skip to content

Handling of trailing tabs in comments not idempotent #422

@Eckaaaaaat

Description

@Eckaaaaaat

When formatting the following code

class Foo {
  void f() {
    int x = 0; // comment<TAB><TAB><TAB>
    return;
  }
}

where <TAB> represents ASCII 0x09 character the formatter removes the last tab character.
Thus when you apply the formatter again, it also removes the last tab.
Expected behavior would be either all trailing tabs removed or kept.

As Unicode reader discards last character if it is a whitespace preseving tabs would be difficult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions