jhipster / jhipster/prettier-java

Support 'yml' as language identifier for yaml in language identifier comment

Open Beginner friendly
#1,061 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.2k
Forks
120
Avg merge
1d 14h
Merged PRs (30d)
27

Description

IntelliJ treats both 'yaml' and 'yml' as YAML content.

**Prettier-Java 2.10.3**

```sh
# Options (if any):
--print-width 80
```

**Input:**

```java
// language=yaml
String yaml = """
spring:
data:
jpa:
repositories:
bootstrap-mode: deferred
""";

// language=yml
String yml = """
spring:
data:
jpa:
repositories:
bootstrap-mode: deferred
""";

```

**Output:**

```java
// language=yaml
String yaml = """
spring:
data:
jpa:
repositories:
bootstrap-mode: deferred
""";

// language=yml
String yml = """
spring:
data:
jpa:
repositories:
bootstrap-mode: deferred
""";

```

**Expected behavior:**

Contributor guide

Open the contributing guide

Research direction

Start by locating the language-identifier handling used for Java text blocks and compare the existing yaml path with the yml example. Confirm the change when the yml block is formatted like the yaml block shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, yaml
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.