Skip to content

Commit

Permalink
Allow more chars in hashtag regex
Browse files Browse the repository at this point in the history
Still best-effort for now
  • Loading branch information
cheeaun committed Feb 8, 2025
1 parent fe0efe8 commit 398cbbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/compose.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ const MENTION_RE = new RegExp(

// AI-generated, all other regexes are too complicated
const HASHTAG_RE = new RegExp(
`(^|[^=\\/\\w])(#[a-z0-9_]+([a-z0-9_.]+[a-z0-9_]+)?)(?![\\/\\w])`,
'ig',
`(^|[^=\\/\\w])(#[\\p{L}\\p{N}_]+([\\p{L}\\p{N}_.]+[\\p{L}\\p{N}_]+)?)(?![\\/\\w])`,
'iug',
);

// https://github.com/mastodon/mastodon/blob/23e32a4b3031d1da8b911e0145d61b4dd47c4f96/app/models/custom_emoji.rb#L31
Expand Down

0 comments on commit 398cbbe

Please sign in to comment.