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

No sort parameter in BabelLinks #215

Open
Spaceknyte opened this issue Jul 14, 2024 · 1 comment
Open

No sort parameter in BabelLinks #215

Spaceknyte opened this issue Jul 14, 2024 · 1 comment

Comments

@Spaceknyte
Copy link

Spaceknyte commented Jul 14, 2024

As for me, this parameter is very lacking, at least by contexts IDs. How can I do this myself?

@Jako
Copy link
Collaborator

Jako commented Jul 22, 2024

According to the code the links are sorted by the order of the context keys in babel.contextKeys.

If you want to add an own sorting, you have to sort the $outputArray before the line

if ($this->getProperty('toArray')) {

If you prepare an acceptable solution (a private sort method in the BabelLinks class is suitable), I will add this to the repository.

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

No branches or pull requests

2 participants