fix(comments): Don't return mentions in markdown code (by default)#58974
Conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
| $message = preg_replace('/`[^`\n]*`/', '', $message); | ||
| } | ||
|
|
||
| $ok = preg_match_all("/\B(?<![^a-z0-9_\-@\.\'\s])@(\"(guest|email)\/[a-f0-9]+\"|\"(?:federated_)?(?:group|team|user){1}\/[a-z0-9_\-@\.\' \/:]+\"|\"[a-z0-9_\-@\.\' ]+\"|[a-z0-9_\-@\.\']+)/i", $message, $mentions); |
There was a problem hiding this comment.
The change in this line was from $this->getMessage() to $message, it is otherwise unchanged.
|
/backport to stable33 |
|
The backport to # Switch to the target branch and update it
git checkout stable33
git pull origin stable33
# Create the new backport branch
git checkout -b backport/58974/stable33
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 11959a13
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/58974/stable33Error: Failed to push branch backport/58974/stable33: remote: Invalid username or token. Password authentication is not supported for Git operations. Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|
To keep in mind: This does not work for non-closed backticks, which should be auto-closed according to the specs. |
Right, vue-library also includes a check for ``` or end-of-line to define a fenced code block (but not the inline code, iirc) |
Checklist
3. to review, feature component)stable32)AI (if applicable)
preg_replacewas AI assisted