Skip to content

fix: do not add a blank line at the end on non-java files#738

Closed
exKAZUu wants to merge 1 commit intojhipster:mainfrom
exKAZUu:no-blank-line
Closed

fix: do not add a blank line at the end on non-java files#738
exKAZUu wants to merge 1 commit intojhipster:mainfrom
exKAZUu:no-blank-line

Conversation

@exKAZUu
Copy link
Copy Markdown

@exKAZUu exKAZUu commented Jun 27, 2025

What changed with this PR:

Do not add a blank line at the end of code blocks. Close #737

Example

Input:

# Java

```java
public class Test {

  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}
```

# JavaScript

```javascript
function main() {
  console.log("Hello, World!");
}
```

Output (this PR):

# Java

```java
public class Test {

  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}
```

# JavaScript

```javascript
function main() {
  console.log("Hello, World!");
}
```

Output (before):

# Java

```java
public class Test {

  public static void main(String[] args) {
    System.out.println("Hello, World!");
  }
}

```

# JavaScript

```javascript
function main() {
  console.log("Hello, World!");
}
```

@DanielFran DanielFran requested a review from jtkiesel June 27, 2025 18:26
@jtkiesel
Copy link
Copy Markdown
Contributor

jtkiesel commented Jul 1, 2025

As I mentioned in #737, the issue seems to have been resolved by #731, making this OBE. That being said, I greatly appreciate the time taken to both report the issue and to submit a PR! Do let me know if you still encounter issues after updating to the latest version (2.7.1). Thank you for using and contributing to prettier-plugin-java!

@jtkiesel jtkiesel closed this Jul 1, 2025
@exKAZUu exKAZUu deleted the no-blank-line branch July 1, 2025 12:53
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

Successfully merging this pull request may close these issues.

Do not add a blank line at the end of code blocks

2 participants