Skip to content

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

Closed

Description

@murdos

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

Prettier-Java 2.10.3

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

Input:

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

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

Output:

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

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

Expected behavior:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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