Allow conversion splitters for text extensions#1778
Merged
Conversation
Allow conversion splitters for text extensions Previously RegisterStreamConverter threw for text extensions, and the splitter pipeline only handled stream targets, so a converter could not run against a text extension (eg html). - Drop the text-extension guard in RegisterStreamConverter - DoExtensionConversion now takes the Target itself and resolves the converter input from either a stream or a text (utf8) target, instead of reconstructing an illegal stream Target for text extensions - Scrub text targets before they are fed to a converter, so derived targets (eg rendered images) reflect the scrubbed content - Move converted-target scrubbing into DoExtensionConversion and pass already-converted targets through GetTargets untouched, so each text target is scrubbed exactly once (no double scrub of the re-emitted source) Add ExtensionConverterTests.TextSplitter covering a converter registered against a text extension.
Conflict was in InnerVerifier_Inner.cs GetTargets, where both sides reworked target conversion/scrubbing. Kept this branch's conversion-splitter rework (inline Scrub, early return when doExtensionConversion is false, 2-arg DoExtensionConversion) and applied main's cleanup-composition fix: Func<Task> composed via .Then() rather than +=, which only awaits the last delegate. Also converted the two += cleanups this branch newly added in InnerVerifier_Stream.cs so stream/memory disposal is actually awaited. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 9, 2026
This was referenced Jul 9, 2026
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.
No description provided.