return null bio if the raw bio is null
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m20s

This commit is contained in:
Lee
2024-04-25 08:09:59 +01:00
parent 2b8b135cf8
commit ae19233ddf
2 changed files with 66 additions and 43 deletions

View File

@ -163,6 +163,9 @@ public class Account {
* @return The bio.
*/
public static Bio fromRaw(String raw) {
if (raw == null || raw.isEmpty()) {
return null;
}
return new Bio(
raw.split("\n"),
raw.replaceAll("<[^>]*>", "").split("\n")