Skip to content

Commit 05370db

Browse files
authored
Merge pull request #7556 from Jaspann/improve-hashtags
Fixes hashtags that use non-English characters.
2 parents f6cad2d + a274baf commit 05370db

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/util/external_communication/TextLinkifier.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
public final class TextLinkifier {
3434
public static final String TAG = TextLinkifier.class.getSimpleName();
3535

36-
private static final Pattern HASHTAGS_PATTERN = Pattern.compile("(#[A-Za-z0-9_]+)");
36+
// Looks for hashtags with characters from any language (\p{L}), numbers, or underscores
37+
private static final Pattern HASHTAGS_PATTERN =
38+
Pattern.compile("(#[\\p{L}0-9_]+)");
3739

3840
private TextLinkifier() {
3941
}

0 commit comments

Comments
 (0)