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

Fix "Protected Terms" formatting #10415 #10524

Merged
merged 11 commits into from
Oct 23, 2023
Merged

Conversation

yuyan-z
Copy link
Contributor

@yuyan-z yuyan-z commented Oct 19, 2023

Fixes #10415.

  1. Remove unwanted leading and trailing whitespaces while adding the selected text to list, as required in Step 6.
  2. Remove unwanted empty brackets while formatting the text, as required in Step 14.
  3. Allow the user to add the word at the cursor, as required in Step 4. For example,
    image
    image
    image

Mandatory checks

  • 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 developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@koppor
Copy link
Member

koppor commented Oct 20, 2023

I tried it. Looks good.

One more thing:

  1. Double click "BPMN4TOSCA"
  2. Select "Protect terms" -> "Protect selection"
    image

Here, the space should also not be protected

image

Could you include a fix for that, too?

@yuyan-z
Copy link
Contributor Author

yuyan-z commented Oct 22, 2023

I tried it. Looks good.

One more thing:

  1. Double click "BPMN4TOSCA"
  2. Select "Protect terms" -> "Protect selection"
    image

Here, the space should also not be protected

image

Could you include a fix for that, too?

Thank you for the comments! I updated the code to fix this issue.
Now it can process the selected text containing leading or trailing spaces. For example:
image
image
image

CHANGELOG.md Outdated Show resolved Hide resolved
@yuyan-z yuyan-z requested a review from Siedlerchr October 23, 2023 10:29
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure, test cases would be good. Especially at these low-level string operations. You can do these as follow-up if you want.

For now, good to go!

@koppor koppor enabled auto-merge October 23, 2023 10:38
@koppor koppor added this pull request to the merge queue Oct 23, 2023
Merged via the queue into JabRef:main with commit d55b7ff Oct 23, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix "Protected Terms" formatting
4 participants