static String stripIndents(String doc) {
    Matcher starMatcher = STAR_INDENT.matcher(doc);
    if (starMatcher.matches()) {
      return doc.replaceAll("(?U)(?:^|(\\R)\\h*)\\Q" + starMatcher.group("stars") + "\\E\\h?", "$1");
    }

    Matcher whitespaceMatcher = WS_INDENT.matcher(doc);
    if (whitespaceMatcher.matches()) {
      return doc.replaceAll("(?U)(\\R)" + whitespaceMatcher.group("indent"), "$1");
    }

    return doc;
  }
@Test
  public void stripIndentsFromDocCommentWithoutStars() {
    String parsedComment = "First line\n\t Second Line\n\t  * Third Line\n\t  \n\t  Fifth Line";
    String schemaComment = "First line\nSecond Line\n * Third Line\n \n Fifth Line";
    assertEquals(schemaComment, DocCommentHelper.stripIndents(parsedComment));
  }