Skip to content

Commit

Permalink
fix(search): fix regression from #10932 (#11309)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Sep 5, 2024
1 parent d788cd7 commit d795a53
Show file tree
Hide file tree
Showing 6 changed files with 270 additions and 212 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ private ProtobufUtils() {}

public static String collapseLocationComments(DescriptorProtos.SourceCodeInfo.Location location) {
return Stream.concat(
location.getLeadingDetachedCommentsList().stream(),
Stream.of(location.getLeadingComments(), location.getTrailingComments()))
.filter(Objects::nonNull)
.flatMap(line -> Arrays.stream(line.split("\n")))
.map(line -> line.replaceFirst("^[*/ ]+", ""))
.collect(Collectors.joining("\n"))
.trim();
location.getLeadingDetachedCommentsList().stream(),
Stream.of(location.getLeadingComments(), location.getTrailingComments()))
.filter(Objects::nonNull)
.flatMap(line -> Arrays.stream(line.split("\n")))
.map(line -> line.replaceFirst("^[*/ ]+", ""))
.collect(Collectors.joining("\n"))
.trim();
}

/*
Expand Down
Loading

0 comments on commit d795a53

Please sign in to comment.