Skip to content

Reject trailing content in hyperlink parameter sequences - #296

Merged
jquast merged 1 commit into
jquast:masterfrom
muneikh:reject-trailing-hyperlink-contents
Oct 12, 2026
Merged

jquast merged 1 commit into
jquast:masterfrom
muneikh:reject-trailing-hyperlink-contents

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

HyperlinkParams.parse() accepts trailing text after a valid OSC8 opener even though it parses one complete sequence. Use fullmatch so trailing text, newlines and SGR escapes are rejected with the existing ValueError. Hyperlink.parse() continues scanning surrounding text as before.

Add six regression cases covering BEL and ST terminators.

Validation: the full pure-Python suite has 1,682 passed and 51 skipped; all 20 hyperlink tests pass. Configured Flake8, isort and docformatter checks and git diff --check pass.

@codspeed

codspeed Bot commented Oct 12, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 121 untouched benchmarks


Comparing muneikh:reject-trailing-hyperlink-contents (0ddba45) with master (7776377)

Open in CodSpeed

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.82%. Comparing base (7776377) to head (0ddba45).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #296   +/-   ##
=======================================
  Coverage   87.82%   87.82%           
=======================================
  Files          41       41           
  Lines        5628     5628           
  Branches     1511     1511           
=======================================
  Hits         4943     4943           
  Misses        319      319           
  Partials      366      366           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jquast
jquast merged commit 346fd33 into jquast:master Oct 12, 2026
38 checks passed
@jquast

jquast commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

This method is not documented one way or the other for this behavior, this change has no effect where parse is used in this codebase.

I can only assume this is from AI static analysis, if I don't accept these changes then it is likely other people will be boiling water to re-submit the same, so I guess the best approach is to accept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants