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 d9fb08c9da
commit 26fe587b44
2 changed files with 75 additions and 1 deletions

View File

@@ -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;
}