Fix newline parsing in StringFlag.

This was committed broken 7 years ago and no one told us til today.
This commit is contained in:
wizjany 2019-02-11 22:22:41 -05:00
parent f8e129f33e
commit 96e7c43f56

View File

@ -56,7 +56,7 @@ public String getDefault() {
@Override
public String parseInput(FlagContext context) throws InvalidFlagFormat {
return context.getUserInput().replaceAll("(?!\\\\)\\\\n", "\n").replaceAll("\\\\\\\\n", "\\n");
return context.getUserInput().replaceAll("(?!<\\\\)\\\\n", "\n").replaceAll("\\\\\\\\n", "\\n");
}
@Override