Skip to content

Commit

Permalink
Escape slashes following openrewrite/rewrite-templating#39 (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Dec 16, 2023
1 parent 5e7801e commit 1a0d6a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void bar(String in, CharSequence cs) {
string = Objects.toString(in, "");
string = Objects.toString(in, "nil");
string = in == null ? null : in.replaceAll("\\s+", "");
string = in == null ? null : in.replaceAll("\\\\s+", "");
//bool = StringUtils.endsWithIgnoreCase(in, "suffix");
bool = in == null ? false : in.equalsIgnoreCase("other");
Expand Down Expand Up @@ -195,7 +195,7 @@ void bar(String in, CharSequence cs) {
string = StringUtils.rightPad(in, 5, ' ');
string = StringUtils.rightPad(in, 5, " ");
array = in == null ? null : in.split("\\s+");
array = in == null ? null : in.split("\\\\s+");
//array = StringUtils.split(in, "*");
bool = StringUtils.startsWith(in, "prefix");
bool = StringUtils.startsWithAny(in, "prefix");
Expand Down

0 comments on commit 1a0d6a2

Please sign in to comment.