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 backslash parsing error in preview layout #7752

Closed
wants to merge 2 commits into from

Conversation

brapana
Copy link
Contributor

@brapana brapana commented May 18, 2021

Fixes #7526, catches the StringIndexOutOfBoundsException in TextBasedPreviewLayout.java in order to prevent a backslash parsing error being displayed to the user. When calling .getLayoutFromText() on line 39 of TextBasedPreviewLayout.java, the StringIndexOutOfBoundsException is only thrown on line 261 of LayoutHelper.java (specifically for the backslash parsing error), meaning catching it on line 40 of TextBasedPreviewLayout.java should not adversely affect any other parts of the code.

  • 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

@Siedlerchr Siedlerchr changed the title Fix for issue #7526 fix backslash parsing error in preview layout May 24, 2021
@Siedlerchr Siedlerchr added the status: changes required Pull requests that are not yet complete label May 24, 2021
@calixtus
Copy link
Member

related #7539

@koppor
Copy link
Member

koppor commented Jun 27, 2021

Thank you for working on this. I took the freedom to take over. First of all, I created test cases to really debug the cause and be sure that future changes do not break the contracts.

To free your energy for ohter work, I take the freedom to close this PR.

Follow-up at #7851.

@koppor koppor closed this Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: changes required Pull requests that are not yet complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editing "Custom preview style" triggers exception
4 participants