fix(#63): track fence delimiter type to prevent cross-delimiter closing - #64
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
fix(#63): track fence delimiter type to prevent cross-delimiter closing#64fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Replace the boolean `in_code_fence` toggle in `parse_update_instructions()` with a `fence_char` variable that records which delimiter (`\`` or `~`) opened the current fence. A fence opened with backticks can now only be closed by backticks, and likewise for tildes, conforming to CommonMark spec section 4.5. Add two tests: one verifying that a tilde line inside a backtick fence does not close it, and one verifying the reverse (backtick inside tilde fence). All existing fence tests continue to pass. Closes #63
|
🤖 Finished Review · ✅ Success · Started 12:23 PM UTC · Completed 12:35 PM UTC Commit: |
|
Looks good to me Labels: Bug fix in Python comment parsing module (fence delimiter tracking) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
in_code_fencetoggle with afence_charvariable that tracks which delimiter (`or~) opened the current fenceTesting
python -m pytest tests/test_comment_parsing.py -x -q— all 43 tests passruff check src/ tests/andruff format --check src/ tests/— all cleanCloses #63
Post-script verification
agent/63-cross-delimiter-fence-fix)8c8934984757135bcf935e718a9972c24cb7e472..HEAD)