TextBlockModel (@NotNull String text, int indent) { if (text.length() < 7 || !text.startsWith("\"\"\"") || !text.endsWith("\"\"\"")) return null; int startPrefixLength = findStartPrefixLength(text); if (startPrefixLength == -1) return null; String[] lines = text.substring(startPrefixLength, text.length() - 3).split("\n", -1); return new TextBlockModel(lines, indent, startPrefixLength); }