Fix matching of Substitution based quick actions
What does this MR do?
Simple, substitution-based quick actions like tableflip
and shrug
work unpredictably, matching even when additional characters are present and executing inside code blocks. For example:
tableflipsajkhsd
=>
sajkhsd (╯°□°)╯︵ ┻━┻
shrug123
=>
123 ¯\_(ツ)_/¯
It's not a big deal but it happens also with code blocks, meaning that there's no way to escape these in markdown (such as this description) other than to leave out the /
.
This MR fixes both issues, and addresses #24082 (closed).
There are other cases still unaccounted for. For example multi-line code blocks and inline code blocks with trailing spaces.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team