skip loop check if it is currently inside a loop (#6022)

This commit is contained in:
Sandy Tao
2025-08-11 16:45:31 -07:00
committed by GitHub
parent bab6bef615
commit e3603fd39e
2 changed files with 75 additions and 1 deletions
@@ -179,7 +179,7 @@ export class LoopDetectionService {
const wasInCodeBlock = this.inCodeBlock;
this.inCodeBlock =
numFences % 2 === 0 ? this.inCodeBlock : !this.inCodeBlock;
if (wasInCodeBlock) {
if (wasInCodeBlock || this.inCodeBlock) {
return false;
}