Avoid conversion of single underscores#2711
Merged
Merged
Conversation
Member
|
What about the Unicode Replacement Char? |
Siedlerchr
reviewed
Apr 5, 2017
| - Entries with a single corporate author are now correclty exported to the corresponding `corporate` author field in MS-Office XML. [#1497](https://github.com/JabRef/jabref/issues/1497) | ||
| - Improved author handling in MS-Office Import/Export | ||
| - The `day` part of the biblatex `date` field is now exported to the corresponding `day` field in MS-Office XML. [#2691](https://github.com/JabRef/jabref/issues/2691) | ||
| - Single underscores are not converted to during the LaTeX to unicode conversion, which does not follow the rules of LaTeX, but is what users requre. [#2664](https://github.com/JabRef/jabref/issues/2664) |
Member
There was a problem hiding this comment.
typo: to Latex during the Latex to Unicode cconversion ;)
Siedlerchr
approved these changes
Apr 5, 2017
Siedlerchr
left a comment
Member
There was a problem hiding this comment.
Small issue in the changelog, otherwise LGTM
tobiasdiez
reviewed
Apr 5, 2017
| @Test | ||
| public void testCustomUnderscoreConversion() { | ||
| // our custom version which should preserve the _ | ||
| assertEquals("Lorem ipsum_lorem ipsum", formatter.format("Lorem ipsum_lorem ipsum")); |
Member
There was a problem hiding this comment.
Can you please split the test into two tests and convert your comments into nice test names 😸
Member
Author
|
Excellent idea @Siedlerchr I have implemented this using the replacement char (and it still works). |
Essentially one level deeper in the hierarchy to make sure that BibEntry itself leverages the functionality
Member
Author
|
As discussed in the devcall: This can be merged aber fixing checkstyle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2664
Single underscores that are not followed by
{are not converted to unicode during the LaTeX to unicode conversion. This is not actually correct according to the rules of LaTeX, but seems to be an important exception required by our users.This is achieved by the following:
JABREFUNDERSCOREJABREFUNDERSCOREwith an underscoreTODO: We should find a better magic word instead of
JABREFUNDERSCORE, because every character will be processed by latex2unicode and that costs performance. However, it should still be long and unique enough so that we avoid accidental conversions. Suggestions anyone?