[IMPROVEMENT] Remove @ and add left & right spacing to mentions #2436
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2436 +/- ##
==========================================
Coverage ? 25.97%
==========================================
Files ? 447
Lines ? 16817
Branches ? 0
==========================================
Hits ? 4369
Misses ? 12448
Partials ? 0
Continue to review full report at Codecov.
|
Rocket.ChatTests/Extensions/NSAttributedStringExtensionsSpec.swift
Outdated
Show resolved
Hide resolved
488b7ad
to
8007eb7
Compare
Rocket.ChatTests/Extensions/NSAttributedStringExtensionsSpec.swift
Outdated
Show resolved
Hide resolved
Rocket.ChatTests/Extensions/NSAttributedStringExtensionsSpec.swift
Outdated
Show resolved
Hide resolved
Rocket.ChatTests/Extensions/NSAttributedStringExtensionsSpec.swift
Outdated
Show resolved
Hide resolved
// "\u{00a0}" = non-line-breaking space character | ||
self.insert(NSAttributedString(string: "\u{00a0}"), at: range.location) | ||
self.insert(NSAttributedString(string: "\u{00a0}"), at: range.location + range.length + 1) | ||
return NSRange(location: range.location, length: range.length + 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤓
@@ -2,7 +2,7 @@ | |||
// NSAttributedStringExtensionsSpec.swift | |||
// Rocket.Chat | |||
// | |||
// Created by Matheus Martins on 9/11/17. | |||
// Created by Matheus Cardoso on 9/11/17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely!!! Really nice! 👍
@RocketChat/ios
TODO: tests for the dangerous NSRange methods
Closes #2289