Repository navigation
Conversation
A nested span that wraps a line terminator starts a new paragraph inside the recursive call, while the caller kept appending to the paragraph it had cached before recursing. Text following the span was therefore attached to the first line of the cue instead of the line it appears on. Signed-off-by: Business.arshgoyal <business.arshgoyal@gmail.com>
Contributor
|
✅ DCO Check Passed Thanks @businessarshgoyal, all your commits are properly signed off. 🎉 |
Contributor
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
WebVTTDocumentBackendcached the current cue paragraph in a local variable before walking a cue payload. A nested span (voice, bold, italic, underline) that wraps a line terminator starts a new paragraph inside the recursive call, so after returning the caller was still appending to the paragraph it had cached — text following the span landed on the first line of the cue instead of the line it actually appears on.For
the cue used to produce
['Hello', ' and afterwards', 'there']; it now produces['Hello', 'there', ' and afterwards'].The fix appends to
cue_text[-1]instead of a cached reference, which is by construction the paragraph the terminator handling last opened, at any nesting depth. No existing ground truth changes; the four WebVTT reference documents are unaffected.Issue resolved by this Pull Request:
Resolves #4104
Checklist:
Verified with
uv run pytest tests/test_backend_vtt.py(12 passed) andmake check(ruff clean; thetyand max-lines findings it reports are pre-existing and untouched by this change). The new test fails onmainand passes with the fix.AI disclosure: the patch and test were written with an AI coding agent (Devin) and reviewed and run locally by me.