Inserting a mention should not add extra white spaces #15867
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Suggested merge commit message (convention)
Fix (mention): Inserting a mention should not add an extra white space if there was one already. A white space should not follow a mention inserted in brackets. Closes #4651.
Additional information
In this PR I addressed two issues:
foo [] bar
->mention
->foo @mention[] bar
instead offoo @mention [] bar
)([])
->mention
->(@mention)
instead of(@mention )
I think there are many improvements left related to inserting mentions in different places, for instance, I would expect
"[]
-> type a mention ->"@mention
-> type"
->"@mention"
but this one falls into text transformation category.