Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab characters are not removed from single line comment #1149

Open
romani opened this issue Aug 24, 2024 · 0 comments
Open

Tab characters are not removed from single line comment #1149

romani opened this issue Aug 24, 2024 · 0 comments

Comments

@romani
Copy link

romani commented Aug 24, 2024

content with tab:

public class Test {
  /**
   * The client's first name.
   *
   * @serialField serial String some test some testsome testsome testsome testsome testsome test
   * 			Path components separated by separator loooooooooooooooonooooooooooooooooooooog.
   */
  public String	thirdName;
  // here is tab 	.
  private serial	serial;
}

visualization of tabs and formatting:

$ cat -A Test.java 
public class Test {$
  /**$
   * The client's first name.$
   *$
   * @serialField serial String some test some testsome testsome testsome testsome testsome test$
   * ^I^I^IPath components separated by separator loooooooooooooooonooooooooooooooooooooog.$
   */$
  public String^IthirdName;$
  // here is tab ^I.$
  private serial^Iserial;$
}$


$ java -jar google-java-format-1.23.0-all-deps.jar Test.java > TestUpdated.java

$ cat -T TestUpdated.java 
public class Test {
  /**
   * The client's first name.
   *
   * @serialField serial String some test some testsome testsome testsome testsome testsome test
   *     Path components separated by separator loooooooooooooooonooooooooooooooooooooog.
   */
  public String thirdName;

  // here is tab ^I.
  private serial serial;
}

all tabs are removed except for singleline comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant