-
Notifications
You must be signed in to change notification settings - Fork 45
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 option for line preprocessing #44
Conversation
Add an option for the user manipulate the line that will be fed to the sorting algorithm, using a regular expression. This enables more powerful sorting alternatives without adding to much complexity.
I tried to test this using
But it didn't seem to work, am I doing something wrong? |
Thanks for testing it! That regex ( a bc // ordered as bc
dac // ordered as dac What was the expected result? A regex that would change the sorting order would be dac // ordered as ac
a bc // ordered as bc If you have an opinion on improving the underlying implementation and/or user interface I would gladly take it! |
Thanks for the example, my mistake. First thing I tried after that was |
A capture group number setting is a great idea to make it really customizable! I'll work on it. |
Added the option for the user to specify which capture group will be used for sorting whenever linePreprocessorRegex is set by setting the linePreprocessorRegexCaptureGroup config.
Hey @Tyriar, sorry for taking so long. Added a |
This might be more generally and more flexibly implemented as a comparison customization, as @Tyriar suggested in #40 (comment), eg |
Add an option for the user manipulate the line that will be fed to the sorting algorithm, using a regular expression. This enables more powerful sorting alternatives without adding to much complexity.
With this regex the user will be able to select a part of a line to use as the sorting parameter, or maybe ignore some words.
Fixes #40.
Fixes #33.