Fix to handle extra #enddocregion tags
This commit is contained in:
parent
7349fad338
commit
4bc13ad1a6
@ -25,11 +25,13 @@ module.exports = function regionExtractor() {
|
|||||||
lines[ix] = nullLine;
|
lines[ix] = nullLine;
|
||||||
docs.push(doc);
|
docs.push(doc);
|
||||||
} else if (hasEndRegionTag(line)) {
|
} else if (hasEndRegionTag(line)) {
|
||||||
|
if (doc) {
|
||||||
lines[ix] = nullLine;
|
lines[ix] = nullLine;
|
||||||
doc.endIx = ix;
|
doc.endIx = ix;
|
||||||
doc = docStack.pop();
|
doc = docStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user