1
Fork 0
mirror of https://github.com/Steffo99/patched-porobot.git synced 2024-10-16 17:47:29 +00:00

Fix newlines in displaying telegram cards

This commit is contained in:
Steffo 2022-08-08 16:21:16 +02:00
parent 67ed228958
commit 6300623886
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -153,6 +153,9 @@ fn display_keywords(keywords: &[CardKeyword], hm: &LocalizedCardKeywordIndex) ->
} }
/// Render a [Card::localized_description_text] in [Telegram Bot HTML].
///
/// [Telegram Bot HTML]: https://core.telegram.org/bots/api#html-style
fn display_description(description: &String) -> String { fn display_description(description: &String) -> String {
if description == "" { if description == "" {
"".to_string() "".to_string()
@ -163,6 +166,9 @@ fn display_description(description: &String) -> String {
} }
/// Render a [Card::localized_levelup_text] in [Telegram Bot HTML].
///
/// [Telegram Bot HTML]: https://core.telegram.org/bots/api#html-style
fn display_levelup(levelup: &String) -> String { fn display_levelup(levelup: &String) -> String {
if levelup == "" { if levelup == "" {
"".to_string() "".to_string()