mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Fix newline rendering in embeds on iOS
This commit is contained in:
parent
456fe8f7af
commit
de141d629b
4 changed files with 14 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace PluralKit.Core
|
||||
{
|
||||
|
|
@ -60,5 +61,12 @@ namespace PluralKit.Core
|
|||
if (input.Trim().Length == 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static string NormalizeLineEndSpacing(this string input)
|
||||
{
|
||||
// iOS has a weird issue on embeds rendering newlines when there are spaces *just before* it
|
||||
// so we remove 'em all :)
|
||||
return Regex.Replace(input, " *\n", "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue