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 unprotect_terms to the list of modifiers for bracketed patterns #7960

Merged
merged 3 commits into from
Aug 2, 2021

Conversation

k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

@k3KAW8Pnf7mkmdSMPHz27 k3KAW8Pnf7mkmdSMPHz27 commented Aug 2, 2021

The bracketed patterns for renaming files don't translate fields to Unicode, so if there are protected terms ({In} {CDMA}) the brackets will be translated to underscore, (_In_ _CDMA_) which cannot be removed by the regex modifier (which respects protected terms).

This PR adds the already existing UnprotectTermsFormatter to the list of available modifiers, which can be used through the key unprotect_terms.

The motivation for adding it is https://discourse.jabref.org/t/filename-format-pattern-novice-user/2872 .

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

@Siedlerchr
Copy link
Member

In addtion to remove_braces we also have add_braces. Not sure if this should be added as well?

@calixtus calixtus merged commit 5d67695 into main Aug 2, 2021
@calixtus calixtus deleted the fix-missing-unprotect-terms-formatter branch August 2, 2021 21:06
@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member Author

In addtion to remove_braces we also have add_braces. Not sure if this should be added as well?

I am not sure either 😛
I can't think of a use-case for it, but that doesn't mean it doesn't exist or won't exist in the future. Perhaps add it if/when it is needed?

@Siedlerchr
Copy link
Member

Yeah, if we come up with a use case we can always add it later

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.

4 participants