Skip to content

Preserve and force single inner spaces in inline arrays [ "a", "b" ] #310

Open

Description

@pygarap

Please add an option to preserve, and optionally force, exactly 1 leading space after [ and 1 trailing space before ] for inline (flow) arrays.

Example:

# desired
python: [ "3.13", "3.14" ]

# current (yamlfmt)
python: ["3.13", "3.14"]

Activity

  1. pygarap commented on Sep 16, 2026

    @pygarap
    Author

    @braydonk Would you please consider adding support for this? Thanks 🙏

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