Fix newline rendering in embeds on iOS
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user