diff --git a/lib/index.js b/lib/index.js index 2bbaf51..2b12414 100644 --- a/lib/index.js +++ b/lib/index.js @@ -84,7 +84,9 @@ var toVTT = function (utf8str) { return utf8str .replace(/\{([ibu])\}/g, '<$1>') .replace(/\{\/([ibu])\}/g, '') .replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, '$1.$2') - .replace(/\r?\n\{\\an(\d)\}/, function (_, pos) { return srtPositionToLine(pos) + '\r\n'; }) + .replace(/\r?\n\{\\an(\d)\}/g, function (_, pos) { return srtPositionToLine(pos) + '\r\n'; }) + // force line:93% by default + .replace(/(\d\d:\d\d:\d\d.\d\d\d)\r?\n/g, '$1 line:93%\r\n') .concat('\r\n\r\n'); }; var srtPositionToLine = function (pos) { var _a;