summaryrefslogtreecommitdiff
path: root/Juick/Views
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-12 15:06:33 +0300
committerGravatar Vitaly Takmazov2018-11-12 15:06:33 +0300
commit0c35d513f852d40d8c6c382e2750373b57afe0cd (patch)
tree6a919f569d324d8320a46a9983df9595bb4e735a /Juick/Views
parentb6dc38e5f6bb7a1b820cd23d761484610212c11d (diff)
Fix quote line breaks
Diffstat (limited to 'Juick/Views')
-rw-r--r--Juick/Views/MessageCell.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index 99fb296..f9c9746 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -73,7 +73,10 @@
}
self.text.attributedText = nil;
if (msg.text) {
- NSMutableAttributedString *txt = [[NSMutableAttributedString alloc] initWithString:[msg.text stringByDecodingHTMLEntities] attributes:@{NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]}];
+ NSMutableAttributedString *txt = [[NSMutableAttributedString alloc]
+ initWithString:
+ [[msg.text stringByDecodingHTMLEntities] stringByReplacingOccurrencesOfString:@"\n" withString:@"\r\n"]
+ attributes:@{NSFontAttributeName:[UIFont preferredFontForTextStyle:UIFontTextStyleBody]}];
[txt beginEditing];
for (NSDictionary *entity in msg.entities) {
NSUInteger start = [[entity objectForKey:@"start"] unsignedIntegerValue];