• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

asticode / go-astisub / 34094376782
80%

Build:
DEFAULT BRANCH: master
Ran 07 Sep 2026 07:13AM UTC
Jobs 1
Files 7
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Sep 2026 07:12AM UTC coverage: 79.811% (+0.06%) from 79.753%
34094376782

push

github

web-flow
Fix incorrect WebVTT size mapping for horizontal TTML text (#143)

* Fix incorrect WebVTT size mapping for horizontal TTML text

The bug was in propagateTTMLAttributes() where WebVTTSize was incorrectly
set to the height dimension (dimensions[1]) by default, when it should use
the width dimension (dimensions[0]) for horizontal text.

For TTML with default WritingMode "lrtb" (left-to-right, top-to-bottom),
the WebVTT size: property should represent the horizontal extent (width).
Only for vertical writing modes (starting with "tb") should it use height.

Changes:
- subtitles.go: Swapped the dimension assignments to use width by default
  and height only for vertical writing modes
- ttml_test.go: Updated test expectations to reflect correct behavior
  (WebVTTSize now correctly set to "100%" width instead of height values)

This ensures TTML extent="80% 15%" correctly maps to WebVTT size:80% for
horizontal text, not size:15%.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix WebVTT REGION block format to match W3C specification

Changed from incorrect single-line format:
  Region: id=fred width=40% lines=3 regionanchor=0%,100%

To correct multi-line format:
  REGION
  id:fred
  width:40%
  lines:3
  regionanchor:0%,100%

According to W3C WebVTT specification, REGION blocks must use:
- Multi-line block format (not single-line)
- Colon separators (setting:value, not setting=value)
- Line breaks between each setting

The previous format was non-standard and may not be parsed correctly
by compliant WebVTT parsers.

Reference: https://www.w3.org/TR/webvtt1/#webvtt-region-settings

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Fix TTML to WebVTT region mapping for bottom-aligned text

Changes:
1. RegionAnchor: Changed from "0%,0%" (top-left) to "0%,100%" (bottom-left)
2. ViewportAnchor: Calculate bottom edge position (origin Y + extent height)
   instead of using origin directly

Rationale:
According to W3C WebVTT spec, the defaul... (continued)

69 of 90 new or added lines in 2 files covered. (76.67%)

3 existing lines in 1 file now uncovered.

3202 of 4012 relevant lines covered (79.81%)

61.12 hits per line

Uncovered Changes

Lines Coverage ∆ File
15
85.64
0.32% webvtt.go
6
80.67
-0.21% subtitles.go

Coverage Regressions

Lines Coverage ∆ File
3
85.64
0.32% webvtt.go
Jobs
ID Job ID Ran Files Coverage
1 34094376782.1 07 Sep 2026 07:13AM UTC 7
79.81
GitHub Action Run
Source Files on build 34094376782
  • Tree
  • List 7
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 6e37f4a3 on github
  • Prev Build on master (#32342368670)
  • Next Build on master (#34094752296)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc