mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various improvements
This commit is contained in:
parent
44e737d837
commit
f11a98e489
3 changed files with 13 additions and 29 deletions
|
|
@ -200,17 +200,17 @@ public func stringWithAppliedEntities(_ text: String, entities: [MessageTextEnti
|
|||
}
|
||||
string.addAttribute(NSAttributedString.Key(rawValue: TelegramTextAttributes.BotCommand), value: nsString!.substring(with: range), range: range)
|
||||
case .Pre:
|
||||
string.addAttribute(NSAttributedString.Key.font, value: fixedFont, range: range)
|
||||
addFontAttributes(range, .monospace)
|
||||
if nsString == nil {
|
||||
nsString = text as NSString
|
||||
}
|
||||
string.addAttribute(NSAttributedString.Key(rawValue: TelegramTextAttributes.Pre), value: nsString!.substring(with: range), range: range)
|
||||
case .Code:
|
||||
string.addAttribute(NSAttributedString.Key.font, value: fixedFont, range: range)
|
||||
addFontAttributes(range, .monospace)
|
||||
if nsString == nil {
|
||||
nsString = text as NSString
|
||||
}
|
||||
string.addAttribute(NSAttributedString.Key(rawValue: TelegramTextAttributes.Pre), value: nsString!.substring(with: range), range: range)
|
||||
string.addAttribute(NSAttributedString.Key(rawValue: TelegramTextAttributes.Code), value: nsString!.substring(with: range), range: range)
|
||||
case .BlockQuote:
|
||||
addFontAttributes(range, .blockQuote)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue