Autocomplete of users incorrectly escaping some characters
What does this MR do and why?
Refactor markdown escape processing (!108376 - merged) introduced changes in how markdown escaped characters were converted. Which broke how escaped characters in references are handled.
For example, when searching for @bprescott_
, the autocomplete finds the correct person, but outputs @bprescott\_
. This has the effect of our username reference filter to detect only @bprescott
.
We now detect additional circumstances when an escaped character, such as <span data-escaped-character>~</span>
, should be converted back to ~
or left as is.
How to set up and validate locally
Create some (or all) of the following labels:
c_bug_
d _bug_
e*bug*
f *bug*
f *bug*
g`bug`
h `bug
The following markdown should then render properly when pasted into a comment field and previewed
~c_bug\_
Label ~c_bug\_ and _more_ text
~"d \_bug\_"
~"e\*bug\*"
~"f \*bug\*"
Label ~"f \*bug\*" **with** more text
~"g\`bug\`"
~"h \`bug\`"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #389197 (closed)