Handle when a string has an actual newline in it

This commit is contained in:
libraryaddict 2020-05-07 22:38:10 +12:00
parent 801c3c7239
commit d1c0e9eff8
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -1761,6 +1761,10 @@ public class DisguiseUtilities {
}
public static String[] splitNewLine(String string) {
if (string.contains("\n")) {
return string.split("\n");
}
Pattern regex = Pattern.compile("\\\\+n");
Matcher result = regex.matcher(string);