Skip to content

Commit

Permalink
Release v0.11.11
Browse files Browse the repository at this point in the history
  • Loading branch information
RickEyre committed Jun 19, 2014
1 parent 338688b commit f5a1a60
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vtt.js",
"description": "A JavaScript implementation of the WebVTT specification.",
"version": "0.11.10",
"version": "0.11.11",
"homepage": "https://github.com/mozilla/vtt.js",
"authors": [
"Andreas Gal <gal@mozilla.com>",
Expand Down
17 changes: 13 additions & 4 deletions dist/vtt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* vtt.js - v0.11.10 (https://github.com/mozilla/vtt.js) built on 19-05-2014 */
/* vtt.js - v0.11.11 (https://github.com/mozilla/vtt.js) built on 19-06-2014 */

/**
* Copyright 2013 vtt.js Contributors
Expand Down Expand Up @@ -1698,13 +1698,18 @@
self.state = "HEADER";
}

var alreadyCollectedLine = false;
while (self.buffer) {
// We can't parse a line until we have the full line.
if (!/\r\n|\n/.test(self.buffer)) {
return this;
}

line = collectNextLine();
if (!alreadyCollectedLine) {
line = collectNextLine();
} else {
alreadyCollectedLine = false;
}

switch (self.state) {
case "HEADER":
Expand Down Expand Up @@ -1755,8 +1760,12 @@
self.state = "CUETEXT";
continue;
case "CUETEXT":
// 41-53 - Collect the cue text, create a cue, and add it to the output.
if (!line) {
var hasSubstring = line.indexOf("-->") !== -1;
// 34 - If we have an empty line then report the cue.
// 35 - If we have the special substring '-->' then report the cue,
// but do not collect the line as we need to process the current
// one as a new cue.
if (!line || hasSubstring && (alreadyCollectedLine = true)) {
// We are done parsing self cue.
self.oncue && self.oncue(self.cue);
self.cue = null;
Expand Down
6 changes: 3 additions & 3 deletions dist/vtt.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Andreas Gal <gal@mozilla.com>",
"name": "vtt.js",
"description": "A JavaScript implementation of the WebVTT specification.",
"version": "0.11.10",
"version": "0.11.11",
"repository": {
"type": "git",
"url": "https://github.com/mozilla/vtt.js.git"
Expand Down

0 comments on commit f5a1a60

Please sign in to comment.