chore: Review fix

This commit is contained in:
iamsivin
2026-04-30 10:45:43 +05:30
parent 8d3eb35ab1
commit ccffef6759
@@ -163,13 +163,13 @@ const apply = root => {
const bq = findEnclosingBlockquote(block, root);
if (bq) return bq.remove();
const cutPoint = expandToWrapper(block, root);
if (cutPoint !== block) {
if (cutPoint !== block && cutPoint.parentElement !== root) {
return cutBlockAtMarker(
cutPoint,
t => HEADER_LINE.test(t) || ATTRIBUTION.test(t)
);
}
return block.remove();
return cutPoint.remove();
});
// 5. Top-level RFC `>` / header tail.
const start = findTopLevelTailStart(root);