Skip to content

Commit

Permalink
Handle macOS CR line endings as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Su5eD committed Oct 4, 2023
1 parent 17a3388 commit 8d61bac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public ModInfo(final ModFileInfo owningFile, final IConfigurable config)
this.displayName = config.<String>getConfigElement("displayName")
.orElse(this.modId);
this.description = config.<String>getConfigElement("description")
// Normalize CRLF line endings to use LF instead
.map(desc -> desc.replace("\r\n", "\n"))
// Normalize line endings to use LF instead
.map(desc -> desc.replace("\r\n", "\n").replace("\r", "\n"))
.orElse("MISSING DESCRIPTION");
this.logoFile = Optional.ofNullable(config.<String>getConfigElement("logoFile")
.orElseGet(() -> ownFile.flatMap(mf -> mf.<String>getConfigElement("logoFile"))
Expand Down

0 comments on commit 8d61bac

Please sign in to comment.