int (@NotNull YAMLFormattingContext context, @NotNull ASTNode node) { String fullText = context.getFullText(); int start = node.getTextRange().getStartOffset(); for (int cur = start - 1; cur >= 0; cur--) { if (fullText.charAt(cur) == '\n') { return start - cur - 1; } if (start - cur > 1000) { // So big indent has no practical use... return 0; } } return start; }