Repository navigation
Conversation
ArietidsZ
marked this pull request as ready for review
October 9, 2026 12:25
Member
|
Thank you @ArietidsZ for contributing this fix and for documenting the edge cases and validation so carefully. The examples around caption spacing, punctuation, timestamp validation, and repeated normalization are especially helpful. I'll review the implementation and reproduce the relevant checks against the current main branch before making a merge decision. |
This branch has not been deployed
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.
YouTube timedtext events could join Unicode or quoted words without the required spaces, cross punctuation hidden by closing quotes/brackets, and accept invalid JSON3/XML timestamps. Repeated cue normalization could also change the timeline used for SRT export.
This change preserves spacing between event-level words while keeping JSON3 segments concatenated unchanged. It handles apostrophe suffixes as contractions, recognizes terminal punctuation after closing quotes/brackets, and allows common titles to continue only before a reliable capitalized name-like word. Ambiguous abbreviations, domain-like endings, and decimal-like endings keep their event boundaries.
JSON3/XML start and duration validation rejects invalid types, blank values, and negative times; cue normalization discards non-finite ends. Missing or zero durations retain inference from the next valid cue. Incremental-prefix collapse and word-stream merging converge to make repeated normalization and SRT export idempotent.
The branch is based directly on upstream
af81332fb598f78b1199d103e0943e4e521a7f96. Only the data module, its tests, and a short validation note change.Validation on that baseline, on CW with pnpm 9.12.1 and WXT 0.20.18, through the resource-safe wrapper with one worker and serial commands:
pnpm test:audit,pnpm compile, Chrome/Firefox/Userscript builds, the Userscript verifier, andpnpm docs:buildpassed.These are offline fixture and build checks. They do not establish real YouTube response capture, online translation quality, ASR, or GPU behavior.