Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[next] fix(NcRichText): modify MENTION_START regex to work on older MobileSafari versions #5993

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mixins/richEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import stripTags from 'striptags'
import { createApp } from 'vue'

// Referenced from public function getMentions(): https://github.com/nextcloud/server/blob/master/lib/private/Comments/Comment.php
// Beginning or whitespace. Non-capturing group within word boundary
const MENTION_START = /\B(?<![^a-z0-9_\-@.'\s])/.source
// Beginning or whitespace. Uses positive lookahead (to work on MobileSafari <16.4)
const MENTION_START = /(?=[a-z0-9_\-@.'])\B/.source
// Capturing groups like: @user-id, @"guest/abc16def", @"federated_user/user-id", @"user-id with space"
const MENTION_SIMPLE = /(@[a-z0-9_\-@.']+)/.source
const MENTION_GUEST = /@&quot;guest\/[a-f0-9]+&quot;/.source
Expand Down
Loading