Fix conversion of "'n" and "\'{n}" from LaTeX to Unicode#2464
Merged
Conversation
Siedlerchr
approved these changes
Jan 13, 2017
Siedlerchr
left a comment
Member
There was a problem hiding this comment.
You are right and our Latex/Unicode mapping is the hell...
Rest looks good
tobiasdiez
reviewed
Jan 15, 2017
| @Test | ||
| public void testApostrophN () { | ||
| assertEquals("Maliński", formatter.format("Mali\\'{n}ski")); | ||
| assertEquals("Maliʼnski", formatter.format("Mali'nski")); |
Member
There was a problem hiding this comment.
Only one assert per tests pls...... 😢
Siedlerchr
added a commit
that referenced
this pull request
Jan 18, 2017
* upstream/master: Save deletion of current searchquery (#2469) Update dev dependencies (mockito, wiremock, assertj) Update BouncyCastle (1.55->1.56), ANTRL4 (4.5.3->4.6), jsoup (1.10.1->1.10.2) Group all checker which only check the value of one field (#2437) Follow up #2428 (#2438) Fix conversion of "'n" and "\'{n}" from LaTeX to Unicode (#2464) Fix failing tests
This was referenced Feb 1, 2017
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.
This is a follow up for fixing #2458
The combinations
\'nand\\'{n}are converted from LaTeX to different symbols in Unicode.This was really hard to track down. It was not a problem in our conversion maps, but in
LatexToUnicode. The ultimate reason is that this code is just an utter mess of hacks and I could only fix this by adding another ugly map on top of this heap.We have already identified this class to cause performance issues and, as you can see here, it is very difficult to maintain. We should consider removing the functionality and rewriting it from scratch or (preferably) replace it with an external library. After all, converting a LaTeX string to Unicode seems sufficiently well-defined that there is some library for this out there.