Skip to content

Bug or Feature? Sorting strings with quotes #76

Open
@thiagowfx

Description

@thiagowfx

Given main.yaml:

# keep-sorted start
- b
- "d"
- c
# keep-sorted end

What should happen? I would have expected "d" to come last:

% cat main.yaml
# keep-sorted start
- b
- c
- "d"
# keep-sorted end

This is what happens instead (v0.6.0):

% keep-sorted main.yaml
% cat main.yaml
# keep-sorted start
- "d"
- b
- c
# keep-sorted end

It's technically correct from a lexical sorting perspective, but is it intended?

Assuming it is intended, is there a workaround to make it consider ASCII characters only? Perhaps with by_regex?

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