Skip to content

fix(user-input-fold): match fenced code delimiters - #405

Closed
testikun wants to merge 1 commit into
openpi-dev:mainfrom
testikun:codex/issue-334-user-input-fold
Closed

fix(user-input-fold): match fenced code delimiters#405
testikun wants to merge 1 commit into
openpi-dev:mainfrom
testikun:codex/issue-334-user-input-fold

Conversation

@testikun

@testikun testikun commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Problem

Closes #334. The user-input fold parser treated any three-or-more backticks as a closing fence, so nested four-backtick blocks could close early; tilde fences were not recognized.

Fix

  • Match closing fences to the opening fence character and minimum length.
  • Support both backtick and tilde fenced blocks.
  • Add regression coverage for nested and tilde fences.

Validation

  • node --experimental-strip-types --test extensions/user-input-fold/index.test.ts
  • 21 passed, 0 failed
  • git diff --check

@github-actions github-actions Bot added the area:ui Terminal UI, rendering, themes, or visual assets label Sep 5, 2026
@testikun

testikun commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

关闭重复 PR:当前主分支已通过 #336 实现 fence 修复。本 PR 基于落后的本地 main,不应重复合入。

@testikun testikun closed this Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Terminal UI, rendering, themes, or visual assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(user-input-fold): nested code fences and tildes cause premature fold truncation and unclosed block leakage

1 participant