fix folding exception in haml

This commit is contained in:
Dennis Ushakov
2012-05-14 11:03:24 +04:00
parent 1bed11eddd
commit 6f6eef2487
@@ -32,7 +32,7 @@ public abstract class IndentationFoldingBuilder implements FoldingBuilder, DumbA
private void collectDescriptors(@NotNull final ASTNode node, @NotNull final List<FoldingDescriptor> descriptors) {
final ASTNode[] children = node.getChildren(myTokenSet);
if (children.length > 0) {
if (node.getTreeParent() !=null) {
if (node.getTreeParent() !=null && node.getTextLength() > 0) {
descriptors.add(new FoldingDescriptor(node, node.getTextRange()));
}
for (ASTNode child : children) {