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

Support for $\backslash$ in file paths #9906

Merged
merged 2 commits into from
May 16, 2023
Merged

Conversation

koppor
Copy link
Member

@koppor koppor commented May 15, 2023

Fixes https://discourse.jabref.org/t/mendeley-bib-import-with-linked-files/3470. Fixes https://github.com/JabRef/jabref-issue-melting-pot/issues/178.

Compulsory checks

Preview Give feedback

@koppor koppor mentioned this pull request May 15, 2023
5 tasks
if (value == null) {
this.value = null;
} else {
this.value = value.replace("$\\backslash$", "\\");
Copy link
Member

Choose a reason for hiding this comment

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

Why not call the latex 2 Unicode formatter to capture more cases

Copy link
Member Author

Choose a reason for hiding this comment

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

I would need to rewrite the logic of the latextounicode formatter:

grafik

Expected :[ParsedFileField{description='', link='C:/Users/XXXXXX/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Brown - 2017 - Physical test methods for elastomers.pdf', fileType='pdf'}]
Actual :[ParsedFileField{description='', link='Cbackslash{}{', fileType='}{/}Users/XXXXXX/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Brown - 2017 - Physical test methods for elastomers.pdf'}]

Expected :[ParsedFileField{description='test:;', link='wei2005ahp.pdf', fileType='PDF'}]
Actual :[ParsedFileField{description='test ', link='wei2005ahp.pdf', fileType='PDF'}]

Should I commit nevertheless?

Copy link
Member

Choose a reason for hiding this comment

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

I would go with the simple solution first and leave this whooe latex removing for later

Copy link
Member

Choose a reason for hiding this comment

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

One would probaly treat each path segment separately by the formatter

Copy link
Member Author

Choose a reason for hiding this comment

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

In the original example, there were no umlauts there. I was thinking: better a quick fix than some effort on catching the special cases 😇

Siedlerchr
Siedlerchr previously approved these changes May 16, 2023
@Siedlerchr Siedlerchr merged commit 228ce99 into main May 16, 2023
@Siedlerchr Siedlerchr deleted the enable-mendeley-path-parsing branch May 16, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants