summaryrefslogtreecommitdiff
path: root/packages/core/src/services/loopDetectionService.ts
diff options
context:
space:
mode:
authorSandy Tao <[email protected]>2025-08-11 16:45:31 -0700
committerGitHub <[email protected]>2025-08-11 23:45:31 +0000
commit26fe587b441087ec6894ccf347fa9859f5feae81 (patch)
tree768750f1d91e2ef7a6e7cb57ea499a3261d1f9a6 /packages/core/src/services/loopDetectionService.ts
parentd9fb08c9da3d2e8c501ec9badb2e2bd79eb15b93 (diff)
skip loop check if it is currently inside a loop (#6022)
Diffstat (limited to 'packages/core/src/services/loopDetectionService.ts')
-rw-r--r--packages/core/src/services/loopDetectionService.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/core/src/services/loopDetectionService.ts b/packages/core/src/services/loopDetectionService.ts
index 409e92a8..f89e00da 100644
--- a/packages/core/src/services/loopDetectionService.ts
+++ b/packages/core/src/services/loopDetectionService.ts
@@ -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;
}