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:
parent
67ed228958
commit
6300623886
1 changed files with 6 additions and 0 deletions
|
@ -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 {
|
||||
if description == "" {
|
||||
"".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 {
|
||||
if levelup == "" {
|
||||
"".to_string()
|
||||
|
|
Loading…
Reference in a new issue