Skip to content

Commit

Permalink
[#752] Fixed linting issues. Simplified as well
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenaw committed Jun 8, 2012
1 parent d46d12b commit 5ce1c5f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions parsers/parserTTML/popcorn.parserTTML.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,14 @@

// Parse a node for text content
function parseNode( node, timeOffset, region ) {
var sub = {},
track = {};
var sub = {};

// Trim left and right whitespace from text and convert non-explicit line breaks
sub.text = node.textContent.replace( rWhitespace, "" ).replace( rLineBreak, "<br />" );
sub.id = node.getAttribute( "xml:id" ) || node.getAttribute( "id" );
sub.start = toSeconds ( node.getAttribute( "begin" ), timeOffset );
sub.end = toSeconds( node.getAttribute( "end" ), timeOffset );
sub.target = getNodeRegion( node, region);
sub.target = getNodeRegion( node, region );

if ( sub.end < 0 ) {
// No end given, infer duration if possible
Expand All @@ -124,8 +123,7 @@
}
}

track[ "subtitle" ] = sub;
return track;
return { subtitle : sub };
}

// Convert time expression to SS.mmm
Expand Down

0 comments on commit 5ce1c5f

Please sign in to comment.