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

Feat: support sort list-like attribute values by frequency #111

Merged
merged 3 commits into from
Oct 20, 2020

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Oct 19, 2020

#86.

Support sort list-like attribute values by frequency.

Now sortAttributesWithLists configuration accept following values:

  • alphabetical
  • frequency

Old configuration true will be considered as alphabetical, thus no breaking changes being introduced.

@maltsev maltsev merged commit 6f207aa into posthtml:master Oct 20, 2020
@maltsev
Copy link
Member

maltsev commented Oct 20, 2020

I think it'd be helpful to provide also some pros/cons of using alphabetical VS frequency.

@kidonng
Copy link

kidonng commented Oct 25, 2020

@maltsev AFAIK frequency based sorting (such as Huffman) is usually used in image compression. For text documents alphabetical based sorting is more common.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants