Skip to content

Fix "Protected Terms" formatting #10415#10524

Merged
koppor merged 11 commits into
JabRef:mainfrom
yuyan-z:fix-issue-10415
Oct 23, 2023
Merged

Fix "Protected Terms" formatting #10415#10524
koppor merged 11 commits into
JabRef:mainfrom
yuyan-z:fix-issue-10415

Conversation

@yuyan-z

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

Copy link
Copy Markdown
Contributor

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

koppor commented Oct 20, 2023

Copy link
Copy Markdown
Member

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

yuyan-z commented Oct 22, 2023

Copy link
Copy Markdown
Contributor Author

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

Comment thread CHANGELOG.md Outdated
@yuyan-z yuyan-z requested a review from Siedlerchr October 23, 2023 10:29

@koppor koppor left a comment

Copy link
Copy Markdown
Member

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
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