private static boolean lineHasUnclosedSnippetTag(@NotNull String line) {
    var matcher = SNIPPET_START_PATTERN.matcher(line);
    var hasResult = false;
    var lastEnd = -1;
    do {
      hasResult = matcher.find();
      if (hasResult) {
        lastEnd = matcher.end();
      }
    } while (hasResult);
    return lastEnd == line.length();
  }
private static boolean lineHasUnclosedSnippetTag(@NotNull String line)