-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update KeywordEditor to work with escaping #14929
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
base: main
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
|
Why dont you want to keep the converter static and reusable? |
Because the converter needs access to the object's data to convert the strings. |
|
Did it occur to you, that a keyword is different from a keywordlist? |
What do you mean by that? |
|
The String converter for keywords is not meant to be used to parse a list of keywords, hoping that I ly the first one is the one you are looking for. Only clear defined keywords as strings to be converted are expected. Parsing for shg else must be done beforehand. |
|
That's why the String converter was static. To keep the code clean. |
|
To create a Keyword from a string, the string must be parsed first. However, the logic in KeywordList#parse already returns a KeywordList populated with created Keywords. If we introduce a separate method to parse a single Keyword while keeping StringConverter static, the fromString method becomes redundant. This approach seems overcomplicated and leads to unused code. |
|
Your pull request conflicts with the target branch. Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line. |
Closes #14780
Follow up for #14637
Update KeywordEditor to work with escaping logic throught jablib/src/main/java/org/jabref/model/entry/KeywordList#Parse and jablib/src/main/java/org/jabref/model/entry/KeywordList#Serialize
Steps to test
This should work the same way both when pasting and entering manualy. Also, when using suggestions, suggested text should be added as tag and serialized version saved to "BibTeX sorce".
Proposed documntation changes JabRef/user-documentation#615
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)