Skip to content

Conversation

@harii55
Copy link
Contributor

@harii55 harii55 commented Aug 26, 2025

Closes #13015

Reformats the BibTeX shown in the Import dialog’s “Show BibTeX source” preview to JabRef’s canonical style. The incoming string is parsed into a BibEntry and rendered via BibEntryWriter with reformat=true; if parsing fails, the raw string is shown unchanged. This makes the preview readable and consistent with JabRef’s formatting guidelines.

Steps to test

1.Open JabRef
2.Create new library
3.Open Firefox
4.Ensure that JabRef plugin is installed
5.Navigate to https://learning.oreilly.com/library/view/infrastructure-as-code/9781098150341/
6.Click on "Import references..."
438116402-11652d55-4e96-4518-8ac2-797dba772d8c

7.See Popup
image

8.Select "Show BibTeX source"
9.See the formatting

Before :
image

After :
image

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • I added screenshots in the PR description (if change is visible to the user)
  • I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • 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.

@Siedlerchr
Copy link
Member

You can also trigger this import window when you use the Web search e.g. arxiv or similar

@harii55 harii55 changed the title fix(ui): format BibTeX shown in import dialog source view Fix ( #13015) : reformat BibTex in 'Show BibTex Source' Aug 26, 2025
@harii55 harii55 marked this pull request as ready for review August 26, 2025 15:04
@harii55 harii55 closed this Aug 26, 2025
@harii55 harii55 reopened this Aug 26, 2025
@harii55 harii55 marked this pull request as draft August 26, 2025 15:21
@harii55 harii55 marked this pull request as ready for review August 26, 2025 15:21
@harii55 harii55 closed this Aug 26, 2025
@harii55 harii55 reopened this Aug 26, 2025
@harii55 harii55 closed this Aug 26, 2025
@harii55 harii55 reopened this Aug 26, 2025
@harii55 harii55 changed the title Fix ( #13015) : reformat BibTex in 'Show BibTex Source' fix : reformat BibTex in 'Show BibTex Source' Aug 26, 2025
@harii55 harii55 closed this Aug 26, 2025
@harii55 harii55 reopened this Aug 26, 2025
@harii55 harii55 changed the title fix : reformat BibTex in 'Show BibTex Source' fixes : reformat BibTex in 'Show BibTex Source' Aug 26, 2025
@harii55 harii55 closed this Aug 26, 2025
@harii55 harii55 reopened this Aug 26, 2025
@harii55 harii55 changed the title fixes : reformat BibTex in 'Show BibTex Source' Reformat BibTex in 'Show BibTex Source' Aug 26, 2025
@harii55 harii55 closed this Aug 26, 2025
@harii55 harii55 reopened this Aug 26, 2025
@harii55 harii55 changed the title Reformat BibTex in 'Show BibTex Source' Reformat BibTex in Show BibTex Source Aug 26, 2025
@harii55 harii55 closed this Aug 26, 2025
@harii55 harii55 reopened this Aug 26, 2025
@Siedlerchr
Copy link
Member

No need to close and reopen every time, this creates unnecessary noise

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.

Looks good; just CHANGELOG.md entry missing.


Tested using

"Web search"

image

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.

I added the CHANGELOG.md entry for myself to keep things going.

@jabref-machine
Copy link
Collaborator

Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of [x] (done), [ ] (not done yet) or [/] (not applicable).

@trag-bot
Copy link

trag-bot bot commented Aug 28, 2025

@trag-bot didn't find any issues in the code! ✅✨

@koppor koppor added this pull request to the merge queue Aug 28, 2025
Merged via the queue into JabRef:main with commit 5bd49bf Aug 28, 2025
3 checks passed
Siedlerchr added a commit that referenced this pull request Aug 28, 2025
…n-c23b1a88-5c29-46a2-a007-701edd344b9b' into jetbrains-junie-issue-13623-run-c23b1a88-5c29-46a2-a007-701edd344b9b

* upstream/jetbrains-junie-issue-13623-run-c23b1a88-5c29-46a2-a007-701edd344b9b:
  Streamline code for getTabTitle() (#13781)
  Add missing variables
  Reformat BibTex in Show BibTex Source (#13761)
  Auto publish before JBang tests (#13779)
  Hotfix: calling of publish.yml
  Support BibLaTeX datamodel validations (#13693)
  Auto add and remove of "status: changes-required" label (#13778)
  New Crowdin updates (#13777)
  Restore local-only Git behavior for SLR to fix repository initialization error (#13775)
  Use vanilla hashset (#13771)
  Fix Springer Fetcher names (#13770)
  Fix condition
  Publish SNAPSHOT on jablib change (#13774)
  Adapt as per new set of checks (#13772)
  Bump jablib/src/main/resources/csl-styles from `1194364` to `17cfa60` (#13750)
  Fix path (#13769)
  Mode aware consistency check (#13584)
  Refine JBang check (#13765)
  Add Language Server to the UI and add the integrity/consistency check (#13697)
  Fix/remove comment code (#13763)
Siedlerchr added a commit that referenced this pull request Sep 8, 2025
* upstream/main:
  Add missing variables
  Reformat BibTex in Show BibTex Source (#13761)
  Auto publish before JBang tests (#13779)
  Hotfix: calling of publish.yml
  Support BibLaTeX datamodel validations (#13693)
  Auto add and remove of "status: changes-required" label (#13778)
  New Crowdin updates (#13777)
  Restore local-only Git behavior for SLR to fix repository initialization error (#13775)
  Use vanilla hashset (#13771)
  Fix Springer Fetcher names (#13770)
  Fix condition
  Publish SNAPSHOT on jablib change (#13774)
  Adapt as per new set of checks (#13772)
  Bump jablib/src/main/resources/csl-styles from `1194364` to `17cfa60` (#13750)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import. Format BibTeX source in JabRef style

4 participants