X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=srt2vtt;h=8107e755149fe15f934092c8f03ec16e07f53137;hb=e02bac9182c3df3bb5fa3b23332bc1bc0a742c76;hp=27e0927e23b3b28c7418cbc085e2d4e2e434fad8;hpb=0f6e4863e87087a91d7ca06d100361b2da5da08b;p=srt2vtt.git diff --git a/srt2vtt b/srt2vtt index 27e0927..8107e75 100755 --- a/srt2vtt +++ b/srt2vtt @@ -1,4 +1,4 @@ -#!/usr/bin/guile --no-auto-compile +#!/usr/bin/guile -*- scheme -*- !# @@ -66,7 +66,9 @@ two values: the start time and the end time. Valid input looks like ((start end) (parse-time-span (read-line port))) ((lines) (let loop ((lines '())) (let ((line (read-line port))) - (if (string-null? line) + (if (and (string-null? line) + ;; A subtitle may be a blank line! + (not (null? lines))) lines (loop (cons line lines))))))) (make-subtitle id start end lines)))