Skip to content

Commit fa879ad

Browse files
authored
Another ICU property trying to sneak into Link_* property derivations (#1267)
* Markus’s review * Another ICU property trying to sneak into Link_* property derivations
1 parent 4d97c30 commit fa879ad

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

unicodetools/data/linkification/dev/LinkBracket.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# LinkBracket.txt
2-
# Date: 2025-12-24, 00:04:19 GMT
2+
# Date: 2025-12-24, 14:27:07 GMT
33
# © 2025 Unicode®, Inc.
44
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
55
# For terms of use and license, see https://www.unicode.org/terms_of_use.html
@@ -74,7 +74,7 @@
7474
2E58 ; 2E57 #14.0 (⹘ ⇒ ⹗) RIGHT SQUARE BRACKET WITH DOUBLE STROKE
7575
2E5A ; 2E59 #14.0 (⹚ ⇒ ⹙) TOP HALF RIGHT PARENTHESIS
7676
2E5C ; 2E5B #14.0 (⹜ ⇒ ⹛) BOTTOM HALF RIGHT PARENTHESIS
77-
2E63 ; 2E63 #18.0 (U+2E63 ⇒ U+2E63) RIGHT PARENTHESIS WITH MIDDLE RING
77+
2E63 ; 2E62 #18.0 (U+2E63 ⇒ U+2E62) RIGHT PARENTHESIS WITH MIDDLE RING
7878
3009 ; 3008 #1.1 (〉 ⇒ 〈) RIGHT ANGLE BRACKET
7979
300B ; 300A #1.1 (》 ⇒ 《) RIGHT DOUBLE ANGLE BRACKET
8080
300D ; 300C #1.1 (」 ⇒ 「) RIGHT CORNER BRACKET

unicodetools/src/main/java/org/unicode/utilities/LinkUtilities.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import org.unicode.cldr.util.Counter;
4747
import org.unicode.cldr.util.TransliteratorUtilities;
4848
import org.unicode.props.IndexUnicodeProperties;
49+
import org.unicode.props.UcdProperty;
4950
import org.unicode.props.UcdPropertyValues.Idn_Status_Values;
5051
import org.unicode.props.UnicodeProperty;
5152
import org.unicode.props.UnicodeProperty.UnicodeMapProperty;
@@ -198,11 +199,11 @@ private LinkTermination(String uset) {
198199

199200
static final UnicodeSet EMAIL_EXCLUDES =
200201
new UnicodeSet("[\\u0020 ; \\: \" ( ) \\[ \\] @ \\\\ < >]").freeze();
201-
public static final UnicodeSet validEmailLocalPart =
202+
static final UnicodeSet validEmailLocalPart =
202203
new UnicodeSet(
203204
"[\\p{XID_Continue}\\p{block=basic_latin}-\\p{Cc}]",
204205
new ParsePosition(0),
205-
VersionedSymbolTable.frozenAt(Settings.LATEST_VERSION_INFO))
206+
VersionedSymbolTable.frozenAt(UNICODE_VERSION))
206207
.removeAll(EMAIL_EXCLUDES)
207208
.freeze();
208209
public static final UnicodeProperty LinkEmail =
@@ -224,7 +225,9 @@ private static String quote(String s) {
224225
}
225226

226227
private static int getOpening(int cp) {
227-
return cp == '>' ? '<' : UCharacter.getBidiPairedBracket(cp);
228+
return cp == '>'
229+
? '<'
230+
: IUP.getProperty(UcdProperty.Bidi_Paired_Bracket).getValue(cp).codePointAt(0);
228231
}
229232

230233
private static UnicodeProperty LINK_PAIRED_OPENER;

0 commit comments

Comments
 (0)