blob: 78be8f5ec5d9da0e097fa49574b10e7b1e469563 [file] [log] [blame]
diff --git a/source/data/brkitr/rules/word.txt b/source/data/brkitr/rules/word.txt
index 665758c0..1edadbd7 100644
--- a/source/data/brkitr/rules/word.txt
+++ b/source/data/brkitr/rules/word.txt
@@ -227,3 +227,7 @@ $Regional_Indicator ($Format | $Extend | $ZWJ)* $Regional_Indicator;
# For dictionary-based break
$dictionary $dictionary;
+
+# Skip over potentially very long words or numbers.
+# Not necessary to reach a safe point, but avoids potential performance problems.
+($ALetter | $Numeric) ($ALetter | $Numeric);
diff --git a/source/data/brkitr/rules/word_POSIX.txt b/source/data/brkitr/rules/word_POSIX.txt
index 5ea6a05c..eec29197 100644
--- a/source/data/brkitr/rules/word_POSIX.txt
+++ b/source/data/brkitr/rules/word_POSIX.txt
@@ -221,3 +221,7 @@ $Regional_Indicator ($Format | $Extend | $ZWJ)* $Regional_Indicator;
# For dictionary-based break
$dictionary $dictionary;
+
+# Skip over potentially very long words or numbers.
+# Not necessary to reach a safe point, but avoids potential performance problems.
+($ALetter | $Numeric) ($ALetter | $Numeric);