Skip to content

OCTO-11513 #388

Merged
OlteanuRares merged 1 commit into
mainfrom
OCTO-11513
Jul 14, 2026
Merged

OCTO-11513 #388
OlteanuRares merged 1 commit into
mainfrom
OCTO-11513

Conversation

@OlteanuRares

Copy link
Copy Markdown
Contributor

Summary

  • Base style propagation: ::cue { font-style: italic } now wraps bare text nodes in STYLE openers/closers so downstream writers (VTT, DFXP, SCC) emit inline formatting (<i>, <span tts:fontStyle="italic">) without double-wrapping already-styled cues.
  • Line overflow warning: Emits CaptionReadWarning when a multiline cue's line:% position would push text beyond the viewport (based on WebVTT's 15-line grid). Non-fatal — does not alter output.
  • REGION roundtrip: Reader stores raw region settings on CaptionSet; writer re-emits them as REGION blocks so region:id cue references remain valid in VTT→VTT conversion.
  • CaptionSet.regions: New optional regions parameter (defaults to {}) with get_regions()/set_regions() accessors. Keyword-only in practice — no positional arg shift for existing callers.

Safety

  • SCC ingestion pipeline unaffected: SCC reader produces no ::cue styles or regions, so new logic never triggers.
  • Skylab's WebVTTSegmentWriter creates CaptionSet({lang: CaptionList(...)}) without styles/regions — confirmed no breakage.
  • deepcopy in writers correctly preserves the new _regions dict.
  • stacklevel=4 on warning verified to point at the caller's .read() line.

Test plan

  • 18 new tests covering all four features (base style wrap, no double-wrap, line overflow warning, region roundtrip)
  • Full suite passes: 439 passed in 0.49s
  • Edge cases verified: nested tags, partial styling, multiline cues with BREAKs, empty nodes, mismatched close tags
  • Cross-format: VTT with ::cue { font-style: italic } → DFXP produces <span tts:fontStyle="italic">

…s italic/bold/underline

  - Emit CaptionReadWarning when multiline cue line:% extends beyond viewport
  - Preserve REGION blocks through VTT→VTT read/write cycle
  - Add regions param to CaptionSet with get/set accessors
  - Compact changelog for 2.2.29
@OlteanuRares
OlteanuRares requested a review from a team as a code owner July 14, 2026 13:00
@github-actions

Copy link
Copy Markdown

🟡 PR Compliance Review

Risk Level: MEDIUM

  • Compliance Issues: 0 (0 critical)
  • Regressions: 1

REVIEW REQUIRED - Address issues before merging

Full report available in workflow artifacts

@OlteanuRares
OlteanuRares merged commit 117e964 into main Jul 14, 2026
4 checks passed
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