mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
markdown.js: Fix inconsistent user mention on new line.
The user mention regex was checking for multiple lines, so it broke when the user mention was on a new line. This changes the regex AND adds a couple tests to test inline markdown regexes.
This commit is contained in:
@@ -541,7 +541,7 @@ inline.zulip = merge({}, inline.breaks, {
|
||||
'\ud83d[\ude80-\udeff]|\ud83e[\udd00-\uddff]|' +
|
||||
'[\u2000-\u206F]|[\u2300-\u27BF]|[\u2B00-\u2BFF]|' +
|
||||
'[\u3000-\u303F]|[\u3200-\u32FF])'),
|
||||
usermention: /^(@(?:\*\*([^\*]+)\*\*|(\w+)))/m, // Match multi-word string between @** ** or match any one-word
|
||||
usermention: /^(@(?:\*\*([^\*]+)\*\*|(\w+)))/, // Match multi-word string between @** ** or match any one-word
|
||||
stream: /^#\*\*([^\*]+)\*\*/m,
|
||||
avatar: /^!avatar\(([^)]+)\)/,
|
||||
gravatar: /^!gravatar\(([^)]+)\)/,
|
||||
|
||||
Reference in New Issue
Block a user