diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-01-25 11:13:07 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-01-25 11:13:07 -0500 |
commit | f891b76cfc4362946650c298c02bc06d04cdad54 (patch) | |
tree | 45161f08dccab47c2454cca1b52b19515a66b625 | |
parent | 0f6e4863e87087a91d7ca06d100361b2da5da08b (diff) |
Accept blank lines as valid subtitles.
* srt2vtt (read-sub-rip): Allow the first subtitle line to be blank.
-rwxr-xr-x | srt2vtt | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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))) |