Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rule for Sorting YAML Array Values #986

Merged
merged 3 commits into from
Dec 19, 2023
Merged

Conversation

pjkaufman
Copy link
Collaborator

Fixes #508

Add the base level logic for sorting array values.

Changes Made

  • Updated the usage of keys for the dedupe YAML array values rule to make its name clearer in the JSON-esq format
  • Added a rule for sorting array values in alphabetical ascending or descending order
  • Added wording for the rules in English
  • Added some more debug logs and in this case ones for custom regex replacement

@pjkaufman pjkaufman added enhancement New feature or request markdown General Markdown or Markdown related issue or feature labels Dec 19, 2023
@pjkaufman pjkaufman self-assigned this Dec 19, 2023
@pjkaufman pjkaufman merged commit d3515fe into platers:master Dec 19, 2023
1 check passed
@grantx2016
Copy link

I just tested this with the latest release of Linter and it's not working for me. Similarly the deduping not working either. I can confirm that I have enabled these options in the plugin settings. By comparison, if I manually select the relevant lines in the YAML block and run the command 'sort u' then it dedupes and sorts correctly.

@pjkaufman
Copy link
Collaborator Author

I believe that I see the issue. I will push out a patch.

@grantx2016
Copy link

All working A-OK. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request markdown General Markdown or Markdown related issue or feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Sort and De-Duplicate Frontmatter Tags
2 participants