Skip to content

Conversation

mikesamuel
Copy link
Contributor

Previously,

StringUtils.wrapText(".\uD800\uDC00.", 2)
//                           ^ index 2 points here

would insert a <br/> between two paired surrogates.

Now, it shifts the insertion point to a whole code-point boundary.

Previously,

    StringUtils.wrapText(".\uD800\uDC00.", 2)
    //                           ^ index 2 points here

would insert a `<br/>` between two paired surrogates.

Now, it shifts the insertion point to a whole code-point boundary.
@mikesamuel
Copy link
Contributor Author

With this patch, mvn test runs clean on

openjdk version "11.0.8" 2020-07-14

The java.lang.Character APIs used are @since 1.5.

@wumpz wumpz merged commit 5338313 into java-diff-utils:master Nov 22, 2020
@mikesamuel mikesamuel deleted the string-utils-wrap-surrogates branch November 23, 2020 23:43
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.

2 participants