function [blanks,parent] = filterBlanks(parent,nULines)
n = numel(parent);
blanks = find(nULines==0);
for j=1:numel(blanks)
i=blanks(j);
% i is going to be deleted.
% We need to assign parents to the children of i,if any
c = find(parent==i);
if any(c)
% go back through parents til we find a parent that exists and is not empty
p = parent(i);
while p>0 && nULines(p)==0
p = parent(p);
end
for k=1:numel(c)
parent(c(k)) = p;
end
end
end
return