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

Default patterns taking precedence over user-defined ones stops user from fixing some formats. #20

Open
head-gardener opened this issue Aug 19, 2024 · 1 comment

Comments

@head-gardener
Copy link

In this comment you say that default patterns take precedence over user-provided ones. This seems like an unusual choice, and in the case of flake.nix files it not only breaks links (github:NixOS/nixpkgs -> https://github.com/github:NixOS/nixpkgs) but also prevents the user from fixing them. I believe it would be better to parse user patterns before default ones.

@head-gardener
Copy link
Author

After some tinkering I've narrowed it down to this line, where extra patterns get filtered out unless they come strictly before the default ones - even if they overlap. Replacing start_found with end_found does the trick, ready to send a PR.

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

No branches or pull requests

1 participant