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 handling of escapings in bracketed patterns #11967

Merged
merged 8 commits into from
Oct 16, 2024
Merged

Fix handling of escapings in bracketed patterns #11967

merged 8 commits into from
Oct 16, 2024

Conversation

koppor
Copy link
Member

@koppor koppor commented Oct 14, 2024

The bracketed patterns handling introduced at #3238 (maybe earlier) was very unclear. It required unnecessary escaping and could not deal with \" in RegEx strings.

This PR fixes it.

Twin PR: JabRef/user-documentation#524

This PR refs #11367, because it was triggered by the question there.

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • 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.

Copy link
Contributor

The build of this PR is available at https://builds.jabref.org/pull/11967/merge.

Copy link
Contributor

The build of this PR is available at https://builds.jabref.org/pull/11967/merge.

CHANGELOG.md Outdated
@@ -49,6 +49,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- ⚠️ Renamed command line parameters `embeddBibfileInPdf` to `embedBibFileInPdf`, `writeMetadatatoPdf` to `writeMetadataToPdf`, and `writeXMPtoPdf` to `writeXmpToPdf`. [#11575](https://github.com/JabRef/jabref/pull/11575)
- The browse button for a Custom theme now opens in the directory of the current used CSS file. [#11597](https://github.com/JabRef/jabref/pull/11597)
- The browse button for a Custom exporter now opens in the directory of the current used exporter file. [#11717](https://github.com/JabRef/jabref/pull/11717)
- ⚠️ We relaxed the escaping requirements for [bracketed patterns](https://docs.jabref.org/setup/citationkeypatterns). One only needs to write `\"` if a quote sign should be escaped. All other escapings are not necessary (and working) any more. [#11967](https://github.com/JabRef/jabref/pull/11967)
Copy link
Member

Choose a reason for hiding this comment

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

These affect also the filename and file directory patterns

Siedlerchr
Siedlerchr previously approved these changes Oct 15, 2024
@koppor koppor added the automerge PR is tagged with that label will be merged if workflows are green label Oct 16, 2024
@koppor koppor enabled auto-merge October 16, 2024 08:18
Copy link
Contributor

The build of this PR is available at https://builds.jabref.org/pull/11967/merge.

@koppor koppor added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit 0402d08 Oct 16, 2024
27 of 28 checks passed
@koppor koppor deleted the add-regex-tests branch October 16, 2024 08:42
Copy link
Contributor

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

ExrosZ pushed a commit to ExrosZ/jabref that referenced this pull request Oct 17, 2024
* Add references to other tests

* Simplify code

* Add test for extracting the first word

* Relax escaping

* Add link to PR

* Add tests

Refs JabRef#11367

* Refine CHANGELOG.md

* Refine CHANGELOG.md
ExrosZ pushed a commit to ExrosZ/jabref that referenced this pull request Oct 17, 2024
* Add references to other tests

* Simplify code

* Add test for extracting the first word

* Relax escaping

* Add link to PR

* Add tests

Refs JabRef#11367

* Refine CHANGELOG.md

* Refine CHANGELOG.md
ExrosZ pushed a commit to ExrosZ/jabref that referenced this pull request Oct 21, 2024
* Add references to other tests

* Simplify code

* Add test for extracting the first word

* Relax escaping

* Add link to PR

* Add tests

Refs JabRef#11367

* Refine CHANGELOG.md

* Refine CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge PR is tagged with that label will be merged if workflows are green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants