fix(gateway): allow [[as_document]] glued directly to MEDIA path - #67727
Closed
euisuh wants to merge 1 commit into
Closed
fix(gateway): allow [[as_document]] glued directly to MEDIA path#67727euisuh wants to merge 1 commit into
euisuh wants to merge 1 commit into
Conversation
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Collaborator
Duplicate of #63644: both PRs implement the same focused MEDIA cleanup-regex delimiter change for glued |
Author
|
Closing as a duplicate of #63644, which already implements the same cleanup-regex delimiter fix and has green CI. I missed it during initial issue triage. |
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.
What does this PR do?
Allows a recognized
MEDIA:path to be followed immediately by[[as_document]]. The cleanup/extraction matcher previously rejected[as a post-extension delimiter, so the media tag was left in text and no attachment was extracted.The strict media-tag matcher remains unchanged;
[is accepted only after an already-recognized media extension.Related Issue
Fixes #63632
Type of Change
Changes Made
[to the known-extension delimiter lookahead ingateway/platforms/base.py.[[as_document]]directive.How to Test
scripts/run_tests.sh tests/gateway/test_platform_base.py -q.MEDIA:/tmp/report.xlsx[[as_document]]extracts/tmp/report.xlsxand cleans the surrounding text exactly.Checklist
Code
Documentation & Housekeeping