Index: branches/MwEmbedStandAlone/modules/TimedText/mw.TimedText.js |
— | — | @@ -1285,12 +1285,12 @@ |
1286 | 1286 | // Optimize: we could use javascript strings functions instead of jQuery XML parsing: |
1287 | 1287 | $j( '<div>' + data + '</div>' ).find('p').each( function() { |
1288 | 1288 | currentPtext = $j(this).html(); |
1289 | | - //mw.log( 'pText: ' + currentPtext ); |
| 1289 | + mw.log( 'pText: ' + currentPtext ); |
1290 | 1290 | |
1291 | 1291 | //Check if the p matches the "all in one line" match: |
1292 | 1292 | var m = currentPtext |
1293 | 1293 | .replace('-->', '-->') |
1294 | | - .match(/\d+\s([\d\-]+):([\d\-]+):([\d\-]+)(?:,([\d\-]+))?\s*--?>\s*([\d\-]+):([\d\-]+):([\d\-]+)(?:,([\d\-]+))?\n?(.*)/); |
| 1294 | + .match(/\d+\s([\d\-]+):([\d\-]+):([\d\-]+)(?:,([\d\-]+))?\s*--?>\s*([\d\-]+):([\d\-]+):([\d\-]+)(?:,([\d\-]+))?\n?(.*\n?.*)/); |
1295 | 1295 | |
1296 | 1296 | if (m) { |
1297 | 1297 | var startMs = (m[4])? (parseInt(m[4], 10) / 1000):0; |
— | — | @@ -1307,9 +1307,11 @@ |
1308 | 1308 | (parseInt(m[7], 10)) + |
1309 | 1309 | endMs, |
1310 | 1310 | 'content': $j.trim( m[9] ) |
1311 | | - }); |
| 1311 | + }); |
| 1312 | + mw.log( $j.trim( m[9] ) ); |
1312 | 1313 | return true; |
1313 | | - } |
| 1314 | + } |
| 1315 | + |
1314 | 1316 | // Else check for multi-line match: |
1315 | 1317 | if( parseInt( currentPtext ) == currentPtext ) { |
1316 | 1318 | if( curentCap.length != 0) { |